Can a,plug-in trigger custom sounds during playback?
Suppose I have an audio clip that I want to insert into a score. Maybe it's a sound effect. Maybe it's a clip of recorded singing. Maybe something else that doesn't belong in a soundfont.
Can that be triggered by a plug-in during play-back? During audio export?
If it can be done, how would it be notated in the score, to indicate, "Play crickets.wav, repeat 48", or, "Play singing-line-01.mp3, speed 1.06 pitch -100"?
I'm an experienced coder, and I don't see anything like this in the plug-in list, but I might be able to do it if time allows.
Comments
There is no way to trigger audio clips within MuseScore period, not via plugin, not via other methods. There was at one time experimental code to do something along those lines, no idea if the remnants are still there or not. You'd have to delve into the source to see about implementing your idea. Could be worthwhile!
In reply to There is no way to trigger… by Marc Sabatella
What we had is a way to attach a single audio track to be played at the same time than MuseScore playback but nothing trigger a sound at a given time.
The current plugin framework cannot plug in the midi process, and would be to slow anyway. According to me, the best way would be the ability to send OSC messages during the playback. The messages could be used to control an audio player, a light system, a 3D sound system or any other external system. Happy to guide you through the code if you want to have a look. You can find me and other developers on MuseScore IRC channel #musescore on freenode.net
In reply to What we had is a way to… by [DELETED] 5
Thanks for the reply. It seems that the only way to accomplish the idea I had was to build a special purpose soundfont, assigning the sound effects to arbitrary notes in an effects "instrument", and playing them back that way. Other than that, I'm probably looking into the realm of Audacity scripting or some other tool.
I like the idea of allowing a score to insert OSC messages, but that would likely require a bunch of discussion about the right user interface for something that is very much unlike standard music notation.
If such a means of inserting OSC messages were added, could the same mechanism insert custom MIDI SysEx messages too? If there's a space for a "do something that's not standard musical notation" interface anyway, maybe it would make sense for it to do anything that coding resources allow.
In reply to Thanks for the reply. It… by steve98052
I never tried, but it could be possible to send some custom MIDI message using the MIDI action of staff text if defined in a custom instruments.xml. Sysex wouldn't work I believe but some CC should work. So, the UI is partially in place ;)