I am using this “renoise.song().transport:panic()” to stop any sound before firing new notes:
Click to view contents
--button pressed for VPD OSC Server
function vpd_osc_bt_pres( song, snci, ncl )
song = renoise.song()
snci = song.selected_note_column_index
ncl = song.selected_line.note_columns
--panic
song.transport:panic() --avoid coupling for Mouse & MIDI Input!!!
--note bar link (before)
vb.views["NOT_SLIDER"].value = vb.views["VPD_VBX_RETURN_NOTE"].value
--clear entire row (before)
if ( vb.views["VPD_REC"].text == "REC" ) then
ncl[snci]:clear()
end
--on note sound & insert note/pan/volume/ (after)
vpd_osc_client:trigger_instrument( true, song.selected_instrument_index, song.selected_track_index, vb.views["VPD_VBX_RETURN_NOTE"].value, vb.views["VOL_SLIDER"].value )
end
--button released for VPD OSC Server
function vpd_osc_bt_rel( song )
song = renoise.song()
--off note sound & insert note-off (before)
vpd_osc_client:trigger_instrument( false, song.selected_instrument_index, song.selected_track_index, vb.views["VPD_VBX_RETURN_NOTE"].value, vb.views["VOL_SLIDER"].value )
--jump note (after)
if ( vb.views["VPD_REC"].text == "REC" ) then
vpd_search_step_2()--vpd_step()
end
end
I am using OSC Server for sound and live recording, in a tool with a virtual piano and a chordpad.The doubt that I have is if I am correctly using the transport:panic().The objective is to avoid that the chords (or any note), continue to sound when you press several chords (or several notes), not superimpose different chords, because even when playing, I change octaves constantly. Released, it is responsible for stopping any chord, but it is possible to change chords without releasing the button, and that is an overlap problem…
I have done tests with the code and it seems to work well (surprisingly), both in the live recording (play song) and by entering the values in the pattern editor with the sound.Without using panic, the chords can overlap (sound, even writing in other contiguous columns …).
I was afraid thattransport:panic()stop all sounds from all tracks,but it’s not like that.Can anyone explain to me how**transport:panic()**works exactly?
The tool referred to is this (left window):
[sharedmedia=core:attachments:7549]