Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Commit

Permalink
macro work
Browse files Browse the repository at this point in the history
  • Loading branch information
nfxbeats committed Oct 26, 2022
1 parent 3ecd3f4 commit 6980c1d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
13 changes: 8 additions & 5 deletions device_FIRE-NFX.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ def SelectAndShowChannel(newChanIdx, keepPRopen = True):
channels.selectOneChannel(newChanIdx)
_CurrentChannel = newChanIdx

if( oldChanIdx != newChanIdx): # if the channel has changed...
if( oldChanIdx != newChanIdx ): # if the channel has changed...
_ShowChannelEditor = False
_ShowCSForm = False

Expand Down Expand Up @@ -756,28 +756,31 @@ def HandleProgressBar(padNum):
newSongPos = getAbsTicksFromBar(prgMap.BarNumber)
transport.setSongPos(newSongPos, SONGLENGTH_ABSTICKS)

if(_AltHeld):
if(_ShiftHeld):
markerOffs = padOffs + 1
arrangement.addAutoTimeMarker(prgMap.SongPosAbsTicks, Settings.MARKER_PREFIX_TEXT.format(markerOffs))

if(_ShiftHeld):
if(_DoubleTap):
select = True
if( arrangement.selectionEnd() > -1 ): #already selected so lets deselect
select = False

if(len(prgMap.Markers) > 0):
newSongPos = prgMap.Markers[0].SongPosAbsTicks
else:
newSongPos = prgMap[padOffs].SongPosAbsTicks
newSongPos = prgMap.SongPosAbsTicks
transport.setSongPos(newSongPos, SONGLENGTH_ABSTICKS)
selEnd = transport.getSongLength(SONGLENGTH_ABSTICKS)
# select to the next marker or song end
arrangement.jumpToMarker(1, select)

pos = transport.getSongPos(SONGLENGTH_ABSTICKS)
addedEndMarker = False
if pos > newSongPos: # if there is another marker later in time we can use it for the end of selection
print('xpos', pos, newSongPos)
selEnd = pos
else:
print('adding EOF', selEnd)
arrangement.addAutoTimeMarker(selEnd, 'END') # add temp end marker
addedEndMarker = True

Expand Down
17 changes: 17 additions & 0 deletions pluginSoundFontPlayer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from fireNFX_Classes import TnfxParameter, TnfxChannelPlugin
from fireNFX_PluginDefs import USER_PLUGINS
pluginSoundFontPlayer = TnfxChannelPlugin('SoundFont Player')
if(pluginSoundFontPlayer.Name not in USER_PLUGINS.keys()):
USER_PLUGINS[pluginSoundFontPlayer.Name] = pluginSoundFontPlayer
pluginSoundFontPlayer.addParamToGroup('MISC', TnfxParameter(4, 'Modulation', 0, '0', False) )
pluginSoundFontPlayer.addParamToGroup('MISC', TnfxParameter(12, 'Initial filter cutoff', 0, 'Disabled', False) )
pluginSoundFontPlayer.addParamToGroup('Env 2 ', TnfxParameter(5, 'attack time', 0, 'Disabled', False) )
pluginSoundFontPlayer.addParamToGroup('Env 2 ', TnfxParameter(6, 'decay time', 0, 'Disabled', False) )
pluginSoundFontPlayer.addParamToGroup('Env 2 ', TnfxParameter(7, 'sustain level', 0, 'Disabled', False) )
pluginSoundFontPlayer.addParamToGroup('Env 2 ', TnfxParameter(8, 'release time', 0, 'Disabled', False) )
pluginSoundFontPlayer.addParamToGroup('LFO 2', TnfxParameter(9, 'predelay', 0, 'Disabled', False) )
pluginSoundFontPlayer.addParamToGroup('LFO 2', TnfxParameter(10, 'amount', 0, 'Disabled', False) )
pluginSoundFontPlayer.addParamToGroup('LFO 2', TnfxParameter(11, 'speed', 0, 'Disabled', False) )
pluginSoundFontPlayer.addParamToGroup('RevCho', TnfxParameter(2, 'Reverb send level (multiplier)', 0, '100%', False) )
pluginSoundFontPlayer.addParamToGroup('RevCho', TnfxParameter(3, 'Chorus send level (multiplier)', 0, '100%', False) )
pluginSoundFontPlayer.assignKnobs([5,6,7,8,2,3,4,12])

0 comments on commit 6980c1d

Please sign in to comment.