Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Online Docs "Writing Audio Objects with Min” error #206

Open
madronalabs opened this issue Nov 9, 2022 · 3 comments
Open

Online Docs "Writing Audio Objects with Min” error #206

madronalabs opened this issue Nov 9, 2022 · 3 comments
Assignees
Labels

Comments

@madronalabs
Copy link

The document "Writing Audio Objects with Min” (http://cycling74.github.io/min-devkit/guide/audio http://cycling74.github.io/min-devkit/guide/audio) has errors: in particular the "Vector Operators” code will not compile because the function names channelcount() and framecount() do not exist in the current API.

@madronalabs madronalabs added the bug label Nov 9, 2022
@isabelgk isabelgk self-assigned this Nov 9, 2022
@isabelgk
Copy link
Contributor

isabelgk commented Nov 9, 2022

Hi @madronalabs !

I believe this is the section you're referring to?

The number of channels and the size of the vectors are properties of the audio_bundle. Use the channelcount() and framecount() methods to access the dimensions and the samples() method to gain access to the vector data for a specified channel.

It looks like the audio_bundle struct has both methods defined:

https://github.com/Cycling74/min-api/blob/043733c81e0ff0fde0e3fecb6c1730b83f0acf58/include/c74_min_operator_vector.h#L54

https://github.com/Cycling74/min-api/blob/043733c81e0ff0fde0e3fecb6c1730b83f0acf58/include/c74_min_operator_vector.h#L62

You'd have to call input_bundle.channelcount() on the input_bundle rather than channelcount() as a free function. Usually you see audio_bundles passed in as arguments to the perform method of an audio-rate object (e.g. operator())

void operator()(audio_bundle input, audio_bundle output) {

@madronalabs
Copy link
Author

The issue is spelling: c74_min_operator_vector.h defines the methods channel_count() and frame_count(), not channelcount() and framecount().

@isabelgk
Copy link
Contributor

isabelgk commented Nov 9, 2022

Ah, thanks for clarifying! You're totally right, and we should fix this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants