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

Add a kick drum to the stat engine on every beat #18

Open
abbysmal opened this issue Mar 28, 2023 · 2 comments
Open

Add a kick drum to the stat engine on every beat #18

abbysmal opened this issue Mar 28, 2023 · 2 comments
Labels

Comments

@abbysmal
Copy link
Collaborator

For this, issue #17 should be completed in order to send the kick note to another channel.

For every beat in stat_engine's sequencer, we would like to send a single kick to MIDI channel 10.

Which value a kick note should be is described in the General MIDI chart. (here for more information about General MIDI).

The best way to approach this problem would be to get into the sequencer_main_func function in stat_engine.ml. This function is the one that will sequencer and send MIDI notes to the MIDI port, using sleep to space out the notes and beats in time.

In fluidsynth, sending a note to MIDI channel 10 should be enough to trigger the General MIDI drum (maybe @pitag-ha can double check.).

On MacOS the setup will likely need to be a little different, feel free to ask me any question if this is the platform you are using.

@pitag-ha
Copy link
Owner

pitag-ha commented Apr 3, 2023

In fluidsynth, sending a note to MIDI channel 10 should be enough to trigger the General MIDI drum (maybe @pitag-ha can double check.).

Yay, I've just checked this by sending the stat_engine output to channel 10 - using our fantastic new channel feature for message_on. I first tried channel 10 and got the same result as always. However, since we keep on getting off-by-one errors on this project, I've also tried for channel 9 and it works indeed.

It sounds amazing btw! We should have it as a feature...I've just opened an issue for it, so that we don't forget.

@abbysmal
Copy link
Collaborator Author

abbysmal commented Apr 3, 2023

However, since we keep on getting off-by-one errors on this project, I've also tried for channel 9 and it works indeed.

Ha yeah, this is because MIDI channel one really is channel 0000. I think it's counter intuitive but our API is low level-ish so it make sense to have it that way anyway.
And yeah, classic off-by-one cardio-crumble shenanigans. 🙃

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