initial commit of performance instrument

master
Rob Canning 2024-04-25 13:30:05 +02:00
commit ebcb5cf91e
16 changed files with 8964 additions and 0 deletions

4
.gitignore vendored 100644
View File

@ -0,0 +1,4 @@
ardour/radio_helsinki/interchange
ardour/radio_helsinki/radio_helsinki.ardour
ardour/radio_helsinki/klet
ardour/radio_helsinki/peaks

View File

@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<instant>
<Main x="960" y="0" w="316" h="1036" current-tab="editor"/>
<Editor id="48" edit-horizontal-pane-pos="0.84042555093765259" notebook-shrunk="0" edit-vertical-pane-pos="0.66441440582275391" mixer-width="Wide" zoom-focus="ZoomFocusPlayhead" zoom="2048" grid-type="GridTypeBeat" snap-mode="SnapOff" internal-grid-type="GridTypeBeat" internal-snap-mode="SnapOff" pre-internal-grid-type="GridTypeBeat" pre-internal-snap-mode="SnapOff" edit-point="EditAtMouse" visible-track-count="-1" draw-length="GridTypeNone" draw-velocity="-1" draw-channel="-1" playhead="0" left-frame="0" y-origin="0" maximised="0" follow-playhead="1" stationary-playhead="0" mouse-mode="MouseObject" join-object-range="0" show-editor-mixer="0" show-editor-list="0" editor-list-page="0" show-marker-lines="0" show-touched-automation="0" nudge-clock-value="a0@a0">
<Window name="Editor" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1" tabbed="1"/>
<Buttons>
<Press/>
<Release/>
</Buttons>
<Selection/>
<EditorLocations clock-mode="Samples"/>
</Editor>
<Mixer mixer-rhs-pane1-pos="0.31797236204147339" mixer-rhs_pane2-pos="0.69999998807907104" mixer-list-hpane-pos="0.20000000298023224" mixer-inner-pane-pos="0.72282612323760986" narrow-strips="0" show-mixer="0" maximised="0" show-mixer-list="0" monitor-section-visible="0" foldback-strip-visible="0" show-vca-pane="0">
<Window name="Mixer" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1" tabbed="1"/>
</Mixer>
<Preferences>
<Window name="Preferences" visible="0" x-off="0" y-off="0" x-size="960" y-size="804" tabbed="0"/>
</Preferences>
<Meterbridge show-meterbridge="0">
<geometry x-size="600" y-size="400" x-pos="1" y-pos="1"/>
</Meterbridge>
<Recorder recorder-vpane-pos="0.88901734352111816">
<Window name="Recorder" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1" tabbed="1"/>
</Recorder>
<TriggerPage triggerpage-hpane-pos="0.18670886754989624" triggerpage-sidebar-page="0">
<Window name="Cues" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1" tabbed="1"/>
</TriggerPage>
<ClockModes>
<Clock name="primary" mode="BBT" on="1"/>
<Clock name="secondary" mode="Timecode" on="1"/>
<Clock name="bigclock" mode="Timecode" on="1"/>
<Clock name="nudge" mode="Timecode" on="1"/>
<Clock name="EditorTimeInfo-selection-start" mode="Timecode" on="0"/>
<Clock name="EditorTimeInfo-selection-end" mode="Timecode" on="0"/>
<Clock name="EditorTimeInfo-selection-length" mode="Timecode" on="0"/>
<Clock name="EditorTimeInfo-punch-start" mode="Timecode" on="0"/>
<Clock name="EditorTimeInfo-punch-end" mode="Timecode" on="0"/>
<Clock name="ToolbarTimeInfo-selection-start" mode="Timecode" on="0"/>
<Clock name="ToolbarTimeInfo-selection-end" mode="Timecode" on="0"/>
<Clock name="ToolbarTimeInfo-selection-length" mode="Timecode" on="0"/>
</ClockModes>
</instant>

View File

@ -0,0 +1,195 @@
<?xml version="1.0" encoding="UTF-8"?>
<Session version="7001" name="radio_helsinki" sample-rate="44100" session-range-is-free="1" id-counter="170" name-counter="1" event-counter="0" vca-counter="1">
<ProgramVersion created-with="Ardour 7.2.0~ds0-2" modified-with="Ardour 7.2.0~ds0-2"/>
<MIDIPorts>
<Port name="Cue Control in" direction="input"/>
<Port name="MIDI Clock out" direction="output"/>
<Port name="MMC in" direction="input"/>
<Port name="MMC out" direction="output"/>
<Port name="MTC out" direction="output"/>
<Port name="Scene in" direction="input"/>
<Port name="Scene out" direction="output"/>
<Port name="x-virtual-keyboard" direction="output"/>
</MIDIPorts>
<Config>
<Option name="use-region-fades" value="1"/>
<Option name="use-transport-fades" value="1"/>
<Option name="use-monitor-fades" value="1"/>
<Option name="native-file-data-format" value="FormatFloat"/>
<Option name="native-file-header-format" value="WAVE"/>
<Option name="auto-play" value="0"/>
<Option name="auto-return" value="0"/>
<Option name="auto-input" value="0"/>
<Option name="triggerbox-overrides-disk-monitoring" value="1"/>
<Option name="cue-behavior" value="FollowCues"/>
<Option name="punch-in" value="0"/>
<Option name="punch-out" value="0"/>
<Option name="count-in" value="0"/>
<Option name="session-monitoring" value=""/>
<Option name="record-mode" value="RecSoundOnSound"/>
<Option name="draw-opaque-midi_regions" value="0"/>
<Option name="subframes-per-frame" value="100"/>
<Option name="timecode-format" value="timecode_30"/>
<Option name="minitimeline-span" value="120"/>
<Option name="raid-path" value=""/>
<Option name="audio-search-path" value="/home/rob/graz/ardour/radio_helsinki.ardour/interchange/radio_helsinki.ardour/audiofiles"/>
<Option name="midi-search-path" value="/home/rob/graz/ardour/radio_helsinki.ardour/interchange/radio_helsinki.ardour/midifiles"/>
<Option name="track-name-number" value="0"/>
<Option name="track-name-take" value="0"/>
<Option name="take-name" value="Take1"/>
<Option name="jack-time-master" value="1"/>
<Option name="use-video-sync" value="0"/>
<Option name="video-pullup" value="0"/>
<Option name="external-sync" value="0"/>
<Option name="insert-merge-policy" value="InsertMergeRelax"/>
<Option name="timecode-offset" value="0"/>
<Option name="timecode-offset-negative" value="1"/>
<Option name="slave-timecode-offset" value=" 00:00:00:00"/>
<Option name="timecode-generator-offset" value=" 00:00:00:00"/>
<Option name="glue-new-markers-to-bars-and-beats" value="0"/>
<Option name="midi-copy-is-fork" value="0"/>
<Option name="glue-new-regions-to-bars-and-beats" value="0"/>
<Option name="realtime-export" value="0"/>
<Option name="use-video-file-fps" value="0"/>
<Option name="videotimeline-pullup" value="1"/>
<Option name="wave-amplitude-zoom" value="0"/>
<Option name="wave-zoom-factor" value="2"/>
<Option name="show-summary" value="1"/>
<Option name="show-group-tabs" value="1"/>
<Option name="show-region-fades" value="1"/>
<Option name="show-busses-on-meterbridge" value="0"/>
<Option name="show-master-on-meterbridge" value="1"/>
<Option name="show-midi-on-meterbridge" value="1"/>
<Option name="show-rec-on-meterbridge" value="1"/>
<Option name="show-mute-on-meterbridge" value="0"/>
<Option name="show-solo-on-meterbridge" value="0"/>
<Option name="show-monitor-on-meterbridge" value="0"/>
<Option name="show-name-on-meterbridge" value="1"/>
<Option name="show-fader-on-meterbridge" value="0"/>
<Option name="meterbridge-label-height" value="0"/>
</Config>
<Metadata/>
<Sources/>
<TriggerBindings/>
<Regions/>
<Selection/>
<Locations/>
<Bundles/>
<VCAManager/>
<Routes>
<Route version="7001" id="70" name="Master" default-type="audio" strict-io="1" volume-applies-to-output="1" active="1" denormal-protection="0" meter-point="MeterOutput" disk-io-point="DiskIOPreFader" meter-type="MeterK14">
<PresentationInfo order="0" flags="MasterOut,OrderSet" color="2855877119"/>
<Controllable name="solo" id="78" flags="Toggle,RealTime" value="0" self-solo="0" soloed-by-upstream="0" soloed-by-downstream="0"/>
<Controllable name="solo-iso" id="84" flags="Toggle,RealTime" value="0" solo-isolated="0"/>
<Controllable name="solo-safe" id="86" flags="Toggle" value="0" solo-safe="0"/>
<IO name="Master" id="98" direction="Input" default-type="audio">
<Port type="audio" name="Master/audio_in 1"/>
<Port type="audio" name="Master/audio_in 2"/>
</IO>
<IO name="Master" id="99" direction="Output" default-type="audio">
<Port type="audio" name="Master/audio_out 1">
<Connection other="system:playback_1"/>
</Port>
<Port type="audio" name="Master/audio_out 2">
<Connection other="system:playback_2"/>
</Port>
</IO>
<MuteMaster mute-point="PostFader,Listen,Main" muted="0"/>
<Controllable name="mute" id="80" flags="Toggle,RealTime" value="0"/>
<Controllable name="phase" id="82" flags="Toggle" value="0" phase-invert="00"/>
<Controllable name="mastervolume" id="106" flags="GainLike,NotAutomatable" value="1"/>
<Automation>
<AutomationList automation-id="solo" id="77" interpolation-style="Discrete" time-domain="AudioTime" state="Off"/>
<AutomationList automation-id="solo-iso" id="83" interpolation-style="Discrete" time-domain="AudioTime" state="Off"/>
<AutomationList automation-id="solo-safe" id="85" interpolation-style="Discrete" time-domain="AudioTime" state="Off"/>
<AutomationList automation-id="mute" id="79" interpolation-style="Discrete" time-domain="AudioTime" state="Off"/>
<AutomationList automation-id="phase" id="81" interpolation-style="Discrete" time-domain="AudioTime" state="Off"/>
</Automation>
<Pannable>
<Controllable name="pan-azimuth" id="89" flags="" value="0.5"/>
<Controllable name="pan-width" id="93" flags="" value="0"/>
<Controllable name="pan-elevation" id="91" flags="" value="0"/>
<Controllable name="pan-frontback" id="95" flags="" value="0"/>
<Controllable name="pan-lfe" id="97" flags="" value="0"/>
<Automation>
<AutomationList automation-id="pan-azimuth" id="88" interpolation-style="Linear" time-domain="BeatTime" state="Off"/>
<AutomationList automation-id="pan-elevation" id="90" interpolation-style="Linear" time-domain="BeatTime" state="Off"/>
<AutomationList automation-id="pan-width" id="92" interpolation-style="Linear" time-domain="BeatTime" state="Off"/>
<AutomationList automation-id="pan-frontback" id="94" interpolation-style="Linear" time-domain="BeatTime" state="Off"/>
<AutomationList automation-id="pan-lfe" id="96" interpolation-style="Linear" time-domain="BeatTime" state="Off"/>
</Automation>
</Pannable>
<Processor id="101" name="Polarity" active="1" user-latency="0" use-user-latency="0" type="polarity"/>
<Processor id="102" name="Amp" active="1" user-latency="0" use-user-latency="0" type="trim">
<Automation>
<AutomationList automation-id="trim" id="75" interpolation-style="Logarithmic" time-domain="AudioTime" state="Off"/>
</Automation>
<Controllable name="trimcontrol" id="76" flags="GainLike" value="1"/>
</Processor>
<Processor id="100" name="Amp" active="1" user-latency="0" use-user-latency="0" type="amp">
<Automation>
<AutomationList automation-id="gain" id="73" interpolation-style="Exponential" time-domain="AudioTime" state="Off"/>
</Automation>
<Controllable name="gaincontrol" id="74" flags="GainLike" value="1"/>
</Processor>
<Processor id="104" name="Master" active="1" user-latency="0" use-user-latency="0" own-input="1" own-output="0" output="Master" type="main-outs" role="Main">
<PannerShell bypassed="0" user-panner="" linked-to-route="1"/>
</Processor>
<Processor id="103" name="meter-Master" active="1" user-latency="0" use-user-latency="0" type="meter"/>
<Slavable/>
</Route>
</Routes>
<Playlists/>
<UnusedPlaylists/>
<RouteGroups/>
<Click>
<IO name="Click" id="65" direction="Output" default-type="audio">
<Port type="audio" name="Click/audio_out 1">
<Connection other="system:playback_1"/>
</Port>
<Port type="audio" name="Click/audio_out 2">
<Connection other="system:playback_2"/>
</Port>
</IO>
<Processor id="66" name="Amp" active="1" user-latency="0" use-user-latency="0" type="amp">
<Automation>
<AutomationList automation-id="gain" id="63" interpolation-style="Exponential" time-domain="AudioTime" state="Off"/>
</Automation>
<Controllable name="gaincontrol" id="64" flags="GainLike" value="0.21569328010082245"/>
</Processor>
</Click>
<Speakers>
<Speaker azimuth="240" elevation="0" distance="1"/>
<Speaker azimuth="120" elevation="0" distance="1"/>
</Speakers>
<TempoMap superclocks-per-second="282240000">
<Tempos>
<Tempo npm="120" enpm="120" note-type="4" type="Tempo::Constant" active="1" locked-to-meter="0" continuing="0" sclock="0" quarters="0:0" bbt="1|1|0" omega="0"/>
</Tempos>
<Meters>
<Meter note-value="4" divisions-per-bar="4" sclock="0" quarters="0:0" bbt="1|1|0"/>
</Meters>
<MusicTimes/>
</TempoMap>
<ControlProtocols>
<Protocol name="Ableton Push 2" active="0" session-state="0"/>
<Protocol name="ContourDesign" active="0" session-state="0"/>
<Protocol name="Generic MIDI" active="0" session-state="0"/>
<Protocol name="Mackie" active="0" session-state="0"/>
<Protocol name="Novation Launch Control XL" active="0" session-state="0"/>
<Protocol name="Open Sound Control (OSC)" active="0" session-state="0"/>
<Protocol name="PreSonus FaderPort" active="0" session-state="0"/>
<Protocol name="PreSonus FaderPort16" active="0" session-state="0"/>
<Protocol name="PreSonus FaderPort2" active="0" session-state="0"/>
<Protocol name="PreSonus FaderPort8" active="0" session-state="0"/>
<Protocol name="Steinberg CC121" active="0" session-state="0"/>
<Protocol name="Tascam US-2400" active="0" session-state="0"/>
<Protocol name="WebSockets Server (Experimental)" active="0" session-state="0"/>
<Protocol name="Wiimote" active="0" session-state="0"/>
</ControlProtocols>
<Extra>
<Videomonitor active="0"/>
</Extra>
<Script lua="Lua 5.3">c2NyaXB0cyA9IHt9IA==</Script>
<IOPlugins/>
</Session>

View File

@ -0,0 +1,192 @@
<?xml version="1.0" encoding="UTF-8"?>
<Session version="7001" name="radio_helsinki" sample-rate="44100" session-range-is-free="1" id-counter="165" name-counter="1" event-counter="0" vca-counter="1">
<ProgramVersion created-with="Ardour 7.2.0~ds0-2" modified-with="Ardour 7.2.0~ds0-2"/>
<MIDIPorts>
<Port name="Cue Control in" direction="input"/>
<Port name="MIDI Clock out" direction="output"/>
<Port name="MMC in" direction="input"/>
<Port name="MMC out" direction="output"/>
<Port name="MTC out" direction="output"/>
<Port name="Scene in" direction="input"/>
<Port name="Scene out" direction="output"/>
<Port name="x-virtual-keyboard" direction="output"/>
</MIDIPorts>
<Config>
<Option name="use-region-fades" value="1"/>
<Option name="use-transport-fades" value="1"/>
<Option name="use-monitor-fades" value="1"/>
<Option name="native-file-data-format" value="FormatFloat"/>
<Option name="native-file-header-format" value="WAVE"/>
<Option name="auto-play" value="0"/>
<Option name="auto-return" value="0"/>
<Option name="auto-input" value="0"/>
<Option name="triggerbox-overrides-disk-monitoring" value="1"/>
<Option name="cue-behavior" value="FollowCues"/>
<Option name="punch-in" value="0"/>
<Option name="punch-out" value="0"/>
<Option name="count-in" value="0"/>
<Option name="session-monitoring" value=""/>
<Option name="record-mode" value="RecSoundOnSound"/>
<Option name="draw-opaque-midi_regions" value="0"/>
<Option name="subframes-per-frame" value="100"/>
<Option name="timecode-format" value="timecode_30"/>
<Option name="minitimeline-span" value="120"/>
<Option name="raid-path" value=""/>
<Option name="audio-search-path" value="/home/rob/graz/ardour/radio_helsinki.ardour/interchange/radio_helsinki.ardour/audiofiles"/>
<Option name="midi-search-path" value="/home/rob/graz/ardour/radio_helsinki.ardour/interchange/radio_helsinki.ardour/midifiles"/>
<Option name="track-name-number" value="0"/>
<Option name="track-name-take" value="0"/>
<Option name="take-name" value="Take1"/>
<Option name="jack-time-master" value="1"/>
<Option name="use-video-sync" value="0"/>
<Option name="video-pullup" value="0"/>
<Option name="external-sync" value="0"/>
<Option name="insert-merge-policy" value="InsertMergeRelax"/>
<Option name="timecode-offset" value="0"/>
<Option name="timecode-offset-negative" value="1"/>
<Option name="slave-timecode-offset" value=" 00:00:00:00"/>
<Option name="timecode-generator-offset" value=" 00:00:00:00"/>
<Option name="glue-new-markers-to-bars-and-beats" value="0"/>
<Option name="midi-copy-is-fork" value="0"/>
<Option name="glue-new-regions-to-bars-and-beats" value="0"/>
<Option name="realtime-export" value="0"/>
<Option name="use-video-file-fps" value="0"/>
<Option name="videotimeline-pullup" value="1"/>
<Option name="wave-amplitude-zoom" value="0"/>
<Option name="wave-zoom-factor" value="2"/>
<Option name="show-summary" value="1"/>
<Option name="show-group-tabs" value="1"/>
<Option name="show-region-fades" value="1"/>
<Option name="show-busses-on-meterbridge" value="0"/>
<Option name="show-master-on-meterbridge" value="1"/>
<Option name="show-midi-on-meterbridge" value="1"/>
<Option name="show-rec-on-meterbridge" value="1"/>
<Option name="show-mute-on-meterbridge" value="0"/>
<Option name="show-solo-on-meterbridge" value="0"/>
<Option name="show-monitor-on-meterbridge" value="0"/>
<Option name="show-name-on-meterbridge" value="1"/>
<Option name="show-fader-on-meterbridge" value="0"/>
<Option name="meterbridge-label-height" value="0"/>
</Config>
<Metadata/>
<Sources/>
<TriggerBindings/>
<Regions/>
<Selection/>
<Locations/>
<Bundles/>
<VCAManager/>
<Routes>
<Route version="7001" id="70" name="Master" default-type="audio" strict-io="1" volume-applies-to-output="1" active="1" denormal-protection="0" meter-point="MeterOutput" disk-io-point="DiskIOPreFader" meter-type="MeterK14">
<PresentationInfo order="0" flags="MasterOut,OrderSet" color="0"/>
<Controllable name="solo" id="78" flags="Toggle,RealTime" value="0" self-solo="0" soloed-by-upstream="0" soloed-by-downstream="0"/>
<Controllable name="solo-iso" id="84" flags="Toggle,RealTime" value="0" solo-isolated="0"/>
<Controllable name="solo-safe" id="86" flags="Toggle" value="0" solo-safe="0"/>
<IO name="Master" id="98" direction="Input" default-type="audio">
<Port type="audio" name="Master/audio_in 1"/>
<Port type="audio" name="Master/audio_in 2"/>
</IO>
<IO name="Master" id="99" direction="Output" default-type="audio">
<Port type="audio" name="Master/audio_out 1">
<Connection other="system:playback_1"/>
</Port>
<Port type="audio" name="Master/audio_out 2">
<Connection other="system:playback_2"/>
</Port>
</IO>
<MuteMaster mute-point="PostFader,Listen,Main" muted="0"/>
<Controllable name="mute" id="80" flags="Toggle,RealTime" value="0"/>
<Controllable name="phase" id="82" flags="Toggle" value="0" phase-invert="00"/>
<Controllable name="mastervolume" id="106" flags="GainLike,NotAutomatable" value="1"/>
<Automation>
<AutomationList automation-id="solo" id="77" interpolation-style="Discrete" time-domain="AudioTime" state="Off"/>
<AutomationList automation-id="solo-iso" id="83" interpolation-style="Discrete" time-domain="AudioTime" state="Off"/>
<AutomationList automation-id="solo-safe" id="85" interpolation-style="Discrete" time-domain="AudioTime" state="Off"/>
<AutomationList automation-id="mute" id="79" interpolation-style="Discrete" time-domain="AudioTime" state="Off"/>
<AutomationList automation-id="phase" id="81" interpolation-style="Discrete" time-domain="AudioTime" state="Off"/>
</Automation>
<Pannable>
<Controllable name="pan-azimuth" id="89" flags="" value="0.5"/>
<Controllable name="pan-width" id="93" flags="" value="0"/>
<Controllable name="pan-elevation" id="91" flags="" value="0"/>
<Controllable name="pan-frontback" id="95" flags="" value="0"/>
<Controllable name="pan-lfe" id="97" flags="" value="0"/>
<Automation>
<AutomationList automation-id="pan-azimuth" id="88" interpolation-style="Linear" time-domain="BeatTime" state="Off"/>
<AutomationList automation-id="pan-elevation" id="90" interpolation-style="Linear" time-domain="BeatTime" state="Off"/>
<AutomationList automation-id="pan-width" id="92" interpolation-style="Linear" time-domain="BeatTime" state="Off"/>
<AutomationList automation-id="pan-frontback" id="94" interpolation-style="Linear" time-domain="BeatTime" state="Off"/>
<AutomationList automation-id="pan-lfe" id="96" interpolation-style="Linear" time-domain="BeatTime" state="Off"/>
</Automation>
</Pannable>
<Processor id="101" name="Polarity" active="1" user-latency="0" use-user-latency="0" type="polarity"/>
<Processor id="102" name="Amp" active="1" user-latency="0" use-user-latency="0" type="trim">
<Automation>
<AutomationList automation-id="trim" id="75" interpolation-style="Logarithmic" time-domain="AudioTime" state="Off"/>
</Automation>
<Controllable name="trimcontrol" id="76" flags="GainLike" value="1"/>
</Processor>
<Processor id="100" name="Amp" active="1" user-latency="0" use-user-latency="0" type="amp">
<Automation>
<AutomationList automation-id="gain" id="73" interpolation-style="Exponential" time-domain="AudioTime" state="Off"/>
</Automation>
<Controllable name="gaincontrol" id="74" flags="GainLike" value="1"/>
</Processor>
<Processor id="104" name="Master" active="1" user-latency="0" use-user-latency="0" own-input="1" own-output="0" output="Master" type="main-outs" role="Main">
<PannerShell bypassed="0" user-panner="" linked-to-route="1"/>
</Processor>
<Processor id="103" name="meter-Master" active="1" user-latency="0" use-user-latency="0" type="meter"/>
<Slavable/>
</Route>
</Routes>
<Playlists/>
<UnusedPlaylists/>
<RouteGroups/>
<Click>
<IO name="Click" id="65" direction="Output" default-type="audio">
<Port type="audio" name="Click/audio_out 1">
<Connection other="system:playback_1"/>
</Port>
<Port type="audio" name="Click/audio_out 2">
<Connection other="system:playback_2"/>
</Port>
</IO>
<Processor id="66" name="Amp" active="1" user-latency="0" use-user-latency="0" type="amp">
<Automation>
<AutomationList automation-id="gain" id="63" interpolation-style="Exponential" time-domain="AudioTime" state="Off"/>
</Automation>
<Controllable name="gaincontrol" id="64" flags="GainLike" value="0.21569328010082245"/>
</Processor>
</Click>
<Speakers>
<Speaker azimuth="240" elevation="0" distance="1"/>
<Speaker azimuth="120" elevation="0" distance="1"/>
</Speakers>
<TempoMap superclocks-per-second="282240000">
<Tempos>
<Tempo npm="120" enpm="120" note-type="4" type="Tempo::Constant" active="1" locked-to-meter="0" continuing="0" sclock="0" quarters="0:0" bbt="1|1|0" omega="0"/>
</Tempos>
<Meters>
<Meter note-value="4" divisions-per-bar="4" sclock="0" quarters="0:0" bbt="1|1|0"/>
</Meters>
<MusicTimes/>
</TempoMap>
<ControlProtocols>
<Protocol name="Ableton Push 2" active="0" session-state="0"/>
<Protocol name="ContourDesign" active="0" session-state="0"/>
<Protocol name="Generic MIDI" active="0" session-state="0"/>
<Protocol name="Mackie" active="0" session-state="0"/>
<Protocol name="Novation Launch Control XL" active="0" session-state="0"/>
<Protocol name="Open Sound Control (OSC)" active="0" session-state="0"/>
<Protocol name="PreSonus FaderPort" active="0" session-state="0"/>
<Protocol name="PreSonus FaderPort16" active="0" session-state="0"/>
<Protocol name="PreSonus FaderPort2" active="0" session-state="0"/>
<Protocol name="PreSonus FaderPort8" active="0" session-state="0"/>
<Protocol name="Steinberg CC121" active="0" session-state="0"/>
<Protocol name="Tascam US-2400" active="0" session-state="0"/>
<Protocol name="WebSockets Server (Experimental)" active="0" session-state="0"/>
<Protocol name="Wiimote" active="0" session-state="0"/>
</ControlProtocols>
<Script lua="Lua 5.3">c2NyaXB0cyA9IHt9IA==</Script>
<IOPlugins/>
</Session>

View File

@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<instant>
<Main x="0" y="0" w="1920" h="1080" current-tab="mixer"/>
<Mixer mixer-rhs-pane1-pos="0.4140625" mixer-rhs_pane2-pos="0.69999998807907104" mixer-list-hpane-pos="0.20000000298023224" mixer-inner-pane-pos="0.50961542129516602" narrow-strips="0" show-mixer="0" maximised="0" show-mixer-list="0" monitor-section-visible="0" foldback-strip-visible="0" show-vca-pane="0">
<Window name="Mixer" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1" tabbed="1"/>
</Mixer>
<Preferences>
<Window name="Preferences" visible="0" x-off="0" y-off="0" x-size="960" y-size="804" tabbed="0"/>
</Preferences>
<Meterbridge show-meterbridge="0">
<geometry x-size="600" y-size="400" x-pos="1" y-pos="1"/>
</Meterbridge>
<Recorder recorder-vpane-pos="0.88901734352111816">
<Window name="Recorder" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1" tabbed="1"/>
</Recorder>
<TriggerPage triggerpage-hpane-pos="0.30508473515510559" triggerpage-sidebar-page="0">
<Window name="Cues" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1" tabbed="1"/>
</TriggerPage>
<ClockModes>
<Clock name="primary" mode="BBT" on="1"/>
<Clock name="secondary" mode="Timecode" on="1"/>
<Clock name="bigclock" mode="Timecode" on="1"/>
<Clock name="nudge" mode="Timecode" on="1"/>
<Clock name="EditorTimeInfo-selection-start" mode="Timecode" on="0"/>
<Clock name="EditorTimeInfo-selection-end" mode="Timecode" on="0"/>
<Clock name="EditorTimeInfo-selection-length" mode="Timecode" on="0"/>
<Clock name="EditorTimeInfo-punch-start" mode="Timecode" on="0"/>
<Clock name="EditorTimeInfo-punch-end" mode="Timecode" on="0"/>
<Clock name="ToolbarTimeInfo-selection-start" mode="Timecode" on="0"/>
<Clock name="ToolbarTimeInfo-selection-end" mode="Timecode" on="0"/>
<Clock name="ToolbarTimeInfo-selection-length" mode="Timecode" on="0"/>
</ClockModes>
<LastUsedSnapshot name="radio_helsinki"/>
<Editor id="49" edit-horizontal-pane-pos="0.92105263471603394" notebook-shrunk="0" edit-vertical-pane-pos="0.66441440582275391" mixer-width="Wide" zoom-focus="ZoomFocusPlayhead" zoom="1901" grid-type="GridTypeBeat" snap-mode="SnapOff" internal-grid-type="GridTypeBeat" internal-snap-mode="SnapOff" pre-internal-grid-type="GridTypeBeat" pre-internal-snap-mode="SnapOff" edit-point="EditAtMouse" visible-track-count="-1" draw-length="GridTypeNone" draw-velocity="-1" draw-channel="-1" playhead="5003304" left-frame="807038" y-origin="0" maximised="0" follow-playhead="0" stationary-playhead="0" mouse-mode="MouseObject" join-object-range="0" show-editor-mixer="0" show-editor-list="0" editor-list-page="0" show-marker-lines="0" show-touched-automation="0" nudge-clock-value="a1411200000@a0">
<Window name="Editor" visible="0" x-off="-1" y-off="-1" x-size="-1" y-size="-1" tabbed="1"/>
<Buttons>
<Press/>
<Release/>
</Buttons>
<Selection>
<Marker id="3499" start="0"/>
</Selection>
<EditorLocations clock-mode="Samples"/>
</Editor>
</instant>

View File

@ -0,0 +1,13 @@
@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix pset: <http://lv2plug.in/ns/ext/presets#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix state: <http://lv2plug.in/ns/ext/state#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<state.ttl>
lv2:appliesTo <http://lsp-plug.in/plugins/lv2/graph_equalizer_x16_stereo> ;
a pset:Preset ;
rdfs:seeAlso <state.ttl> .

View File

@ -0,0 +1,18 @@
@prefix atom: <http://lv2plug.in/ns/ext/atom#> .
@prefix lv2: <http://lv2plug.in/ns/lv2core#> .
@prefix pset: <http://lv2plug.in/ns/ext/presets#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix state: <http://lv2plug.in/ns/ext/state#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<>
a pset:Preset ;
lv2:appliesTo <http://lsp-plug.in/plugins/lv2/graph_equalizer_x16_stereo> ;
state:state [
<http://lsp-plug.in/plugins/lv2/graph_equalizer_x16_stereo/KVT> [
a atom:Tuple ;
rdf:value ()
]
] .

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
jack_disconnect SuperCollider:out_1 system:playback_1
jack_disconnect SuperCollider:out_2 system:playback_2
jack_connect SuperCollider:out_1 "ardour:SC-0/audio_in 1"
jack_connect SuperCollider:out_2 "ardour:SC-0/audio_in 2"

View File

@ -0,0 +1,264 @@
<!DOCTYPE patchbay>
<patchbay version="0.9.9" name="radio_helsinki">
<output-sockets>
<socket exclusive="off" name="system" client="system" type="jack-audio">
<plug>capture_1</plug>
<plug>capture_2</plug>
<plug>capture_3</plug>
<plug>capture_4</plug>
</socket>
<socket exclusive="off" name="SuperCollider" client="SuperCollider" type="jack-audio">
<plug>out_1</plug>
<plug>out_2</plug>
<plug>out_3</plug>
<plug>out_4</plug>
<plug>out_5</plug>
<plug>out_6</plug>
<plug>out_7</plug>
<plug>out_8</plug>
</socket>
<socket exclusive="off" name="SuperCollider MIDIOUT" client="SuperCollider" type="alsa-midi">
<plug>out0</plug>
<plug>out1</plug>
</socket>
<socket exclusive="off" name="ardour" client="ardour" type="jack-audio">
<plug>LTC\-Out</plug>
<plug>Click\/audio_out\ 1</plug>
<plug>Click\/audio_out\ 2</plug>
<plug>Master\/audio_out\ 1</plug>
<plug>Master\/audio_out\ 2</plug>
<plug>Audio\ 1\/audio_out\ 1</plug>
<plug>Audio\ 1\/audio_out\ 2</plug>
<plug>Audio\ 2\/audio_out\ 1</plug>
<plug>Audio\ 2\/audio_out\ 2</plug>
<plug>Audio\ 3\/audio_out\ 1</plug>
<plug>Audio\ 3\/audio_out\ 2</plug>
<plug>Audio\ 4\/audio_out\ 1</plug>
<plug>Audio\ 4\/audio_out\ 2</plug>
<plug>SC\-0\/audio_out\ 1</plug>
<plug>SC\-0\/audio_out\ 2</plug>
<plug>DELAY\/audio_out\ 1</plug>
<plug>DELAY\/audio_out\ 2</plug>
<plug>DIST\/audio_out\ 1</plug>
<plug>DIST\/audio_out\ 2</plug>
<plug>auditioner\/audio_out\ 1</plug>
<plug>auditioner\/audio_out\ 2</plug>
</socket>
<socket exclusive="off" name="ardour 2" client="ardour" type="jack-audio">
<plug>Click\/audio_out\ 1</plug>
<plug>Click\/audio_out\ 2</plug>
<plug>Master\/audio_out\ 1</plug>
<plug>Master\/audio_out\ 2</plug>
<plug>auditioner\/audio_out\ 1</plug>
<plug>auditioner\/audio_out\ 2</plug>
</socket>
<socket exclusive="off" name="ardour 3" client="ardour" type="jack-audio">
<plug>Audio\ 1\/audio_out\ 1</plug>
<plug>Audio\ 1\/audio_out\ 2</plug>
<plug>Audio\ 2\/audio_out\ 1</plug>
<plug>Audio\ 2\/audio_out\ 2</plug>
<plug>Audio\ 3\/audio_out\ 1</plug>
<plug>Audio\ 3\/audio_out\ 2</plug>
<plug>Audio\ 4\/audio_out\ 1</plug>
<plug>Audio\ 4\/audio_out\ 2</plug>
<plug>SC\-0\/audio_out\ 1</plug>
<plug>SC\-0\/audio_out\ 2</plug>
<plug>DELAY\/audio_out\ 1</plug>
<plug>DELAY\/audio_out\ 2</plug>
<plug>DIST\/audio_out\ 1</plug>
<plug>DIST\/audio_out\ 2</plug>
</socket>
<socket exclusive="off" name="system 2" client="system" type="jack-audio">
<plug>capture_1</plug>
<plug>capture_1</plug>
<plug>capture_2</plug>
<plug>capture_2</plug>
<plug>capture_3</plug>
<plug>capture_3</plug>
<plug>capture_4</plug>
<plug>capture_4</plug>
</socket>
<socket exclusive="off" name="ardour" client="ardour" type="jack-midi">
<plug>MMC\ out</plug>
<plug>Scene\ out</plug>
<plug>x\-virtual\-keyboard</plug>
<plug>MTC\ out</plug>
<plug>MIDI\ Clock\ out</plug>
</socket>
<socket exclusive="off" name="Midi Through" client="Midi\ Through" type="alsa-midi">
<plug>Midi\ Through\ Port\-0</plug>
</socket>
<socket exclusive="off" name="UMC404HD 192k" client="UMC404HD\ 192k" type="alsa-midi">
<plug>UMC404HD\ 192k\ UMC404HD\ 192k\ MID</plug>
</socket>
<socket exclusive="off" name="nanoKONTROL2" client="nanoKONTROL2" type="alsa-midi">
<plug>nanoKONTROL2\ nanoKONTROL2\ _\ CTR</plug>
</socket>
<socket exclusive="off" name="MidiSport 4x4" client="MidiSport\ 4x4" type="alsa-midi">
<plug>MidiSport\ 4x4\ MIDI\ 1</plug>
<plug>MidiSport\ 4x4\ MIDI\ 2</plug>
<plug>MidiSport\ 4x4\ MIDI\ 3</plug>
<plug>MidiSport\ 4x4\ MIDI\ 4</plug>
</socket>
<socket exclusive="off" name="SuperCollider" client="SuperCollider" type="alsa-midi">
<plug>out0</plug>
<plug>out1</plug>
<plug>out2</plug>
<plug>out3</plug>
<plug>out4</plug>
<plug>out5</plug>
<plug>out6</plug>
</socket>
<socket exclusive="off" name="MidiSport 4x4 2" client="MidiSport\ 4x4" type="alsa-midi">
<plug>MidiSport\ 4x4\ MIDI\ 1</plug>
<plug>MidiSport\ 4x4\ MIDI\ 1</plug>
<plug>MidiSport\ 4x4\ MIDI\ 2</plug>
<plug>MidiSport\ 4x4\ MIDI\ 2</plug>
<plug>MidiSport\ 4x4\ MIDI\ 3</plug>
<plug>MidiSport\ 4x4\ MIDI\ 3</plug>
<plug>MidiSport\ 4x4\ MIDI\ 4</plug>
<plug>MidiSport\ 4x4\ MIDI\ 4</plug>
</socket>
</output-sockets>
<input-sockets>
<socket exclusive="off" name="system" client="system" type="jack-audio">
<plug>playback_1</plug>
<plug>playback_2</plug>
<plug>playback_3</plug>
<plug>playback_4</plug>
</socket>
<socket exclusive="off" name="SuperCollider" client="SuperCollider" type="jack-audio">
<plug>in_1</plug>
<plug>in_2</plug>
<plug>in_3</plug>
<plug>in_4</plug>
<plug>in_5</plug>
<plug>in_6</plug>
<plug>in_7</plug>
<plug>in_8</plug>
</socket>
<socket exclusive="off" name="ardour" client="ardour" type="jack-audio">
<plug>physical_audio_input_monitor_enable</plug>
<plug>LTC\ in</plug>
<plug>Master\/audio_in\ 1</plug>
<plug>Master\/audio_in\ 2</plug>
<plug>SC\ Master\/ACE\ Compressor\ \(stereo\)\ 1\/audio_in\ 1</plug>
<plug>Audio\ 1\/audio_in\ 1</plug>
<plug>Audio\ 2\/audio_in\ 1</plug>
<plug>Audio\ 3\/audio_in\ 1</plug>
<plug>Audio\ 4\/audio_in\ 1</plug>
<plug>SC\-0\/audio_in\ 1</plug>
<plug>SC\-0\/audio_in\ 2</plug>
<plug>DELAY\/audio_in\ 1</plug>
<plug>DELAY\/audio_in\ 2</plug>
<plug>DIST\/audio_in\ 1</plug>
<plug>DIST\/audio_in\ 2</plug>
</socket>
<socket exclusive="off" name="system 2" client="system" type="jack-audio">
<plug>playback_1</plug>
<plug>playback_2</plug>
<plug>playback_1</plug>
<plug>playback_2</plug>
<plug>playback_1</plug>
<plug>playback_2</plug>
</socket>
<socket exclusive="off" name="ardour 2" client="ardour" type="jack-audio">
<plug>Master\/audio_in\ 1</plug>
<plug>Master\/audio_in\ 2</plug>
<plug>Master\/audio_in\ 1</plug>
<plug>Master\/audio_in\ 2</plug>
<plug>Master\/audio_in\ 1</plug>
<plug>Master\/audio_in\ 2</plug>
<plug>Master\/audio_in\ 1</plug>
<plug>Master\/audio_in\ 2</plug>
<plug>Master\/audio_in\ 1</plug>
<plug>Master\/audio_in\ 2</plug>
<plug>Master\/audio_in\ 1</plug>
<plug>Master\/audio_in\ 2</plug>
<plug>Master\/audio_in\ 1</plug>
<plug>Master\/audio_in\ 2</plug>
</socket>
<socket exclusive="off" name="ardour 3" client="ardour" type="jack-audio">
<plug>SC\-0\/audio_in\ 1</plug>
<plug>SC\-0\/audio_in\ 2</plug>
</socket>
<socket exclusive="off" name="ardour 4" client="ardour" type="jack-audio">
<plug>physical_audio_input_monitor_enable</plug>
<plug>Audio\ 1\/audio_in\ 1</plug>
<plug>physical_audio_input_monitor_enable</plug>
<plug>Audio\ 2\/audio_in\ 1</plug>
<plug>physical_audio_input_monitor_enable</plug>
<plug>Audio\ 3\/audio_in\ 1</plug>
<plug>physical_audio_input_monitor_enable</plug>
<plug>Audio\ 4\/audio_in\ 1</plug>
</socket>
<socket exclusive="off" name="ardour" client="ardour" type="jack-midi">
<plug>physical_midi_input_monitor_enable</plug>
<plug>MTC\ in</plug>
<plug>MIDI\ Clock\ in</plug>
<plug>MMC\ in</plug>
<plug>Scene\ in</plug>
<plug>Cue\ Control\ in</plug>
</socket>
<socket exclusive="off" name="Midi Through" client="Midi\ Through" type="alsa-midi">
<plug>Midi\ Through\ Port\-0</plug>
</socket>
<socket exclusive="off" name="UMC404HD 192k" client="UMC404HD\ 192k" type="alsa-midi">
<plug>UMC404HD\ 192k\ UMC404HD\ 192k\ MID</plug>
</socket>
<socket exclusive="off" name="nanoKONTROL2" client="nanoKONTROL2" type="alsa-midi">
<plug>nanoKONTROL2\ nanoKONTROL2\ _\ CTR</plug>
</socket>
<socket exclusive="off" name="MidiSport 4x4" client="MidiSport\ 4x4" type="alsa-midi">
<plug>MidiSport\ 4x4\ MIDI\ 1</plug>
<plug>MidiSport\ 4x4\ MIDI\ 2</plug>
<plug>MidiSport\ 4x4\ MIDI\ 3</plug>
<plug>MidiSport\ 4x4\ MIDI\ 4</plug>
</socket>
<socket exclusive="off" name="SuperCollider" client="SuperCollider" type="alsa-midi">
<plug>in0</plug>
<plug>in1</plug>
<plug>in2</plug>
<plug>in3</plug>
<plug>in4</plug>
<plug>in5</plug>
<plug>in6</plug>
<plug>in7</plug>
<plug>in8</plug>
</socket>
<socket exclusive="off" name="SuperCollider 2" client="SuperCollider" type="alsa-midi">
<plug>in5</plug>
<plug>in4</plug>
<plug>in6</plug>
<plug>in5</plug>
<plug>in7</plug>
<plug>in6</plug>
<plug>in8</plug>
<plug>in7</plug>
</socket>
<socket exclusive="off" name="SuperCollider 3" client="SuperCollider" type="alsa-midi">
<plug>in3</plug>
</socket>
<socket exclusive="off" name="SuperCollider 4" client="SuperCollider" type="alsa-midi">
<plug>in4</plug>
<plug>in8</plug>
</socket>
<socket exclusive="off" name="SuperCollider 5" client="SuperCollider" type="alsa-midi">
<plug>in2</plug>
</socket>
</input-sockets>
<slots/>
<cables>
<cable input="SuperCollider" type="jack-audio" output="system"/>
<cable input="ardour 3" type="jack-audio" output="SuperCollider"/>
<cable input="MidiSport 4x4" type="alsa-midi" output="SuperCollider MIDIOUT"/>
<cable input="system 2" type="jack-audio" output="ardour 2"/>
<cable input="ardour 2" type="jack-audio" output="ardour 3"/>
<cable input="ardour 4" type="jack-audio" output="system 2"/>
<cable input="SuperCollider 5" type="alsa-midi" output="Midi Through"/>
<cable input="SuperCollider 3" type="alsa-midi" output="UMC404HD 192k"/>
<cable input="SuperCollider 4" type="alsa-midi" output="nanoKONTROL2"/>
<cable input="SuperCollider 2" type="alsa-midi" output="MidiSport 4x4 2"/>
</cables>
</patchbay>

21
runme.sh 100755
View File

@ -0,0 +1,21 @@
#!/bin/bash
PROJECT="radio_helsinki"
echo $PROJECT.sh
kill `pidof ardour-7.2.0~ds0`
killall -9 qjackctl jackd scserver sclang scide;
/usr/bin/jackd -u -dalsa -r44100 -p256 -n3 -D -Chw:U192k -Phw:U192k &
sleep 1;
# sclang -D gtr.scd &
scide sc/$PROJECT.scd &
sleep 3;
rm ardour/*.bak &
rm ardour/*.history &
ardour ardour/$PROJECT &
sleep 5;
jack/jack_plumbing.sh &
qjackctl &

View File

@ -0,0 +1,478 @@
/*RUN*/
OSCFunc.trace(true); // Turn posting on
OSCFunc.trace(false); // Turn posting off
Server.default.waitForBoot { // see below .bundle timings for starting synths etc.
~b1 = Buffer.alloc(s, s.sampleRate * 4, 1); // Allocate a 3 second mono buffer
~b2 = Buffer.alloc(s, s.sampleRate * 4, 1); // Allocate a 3 second mono buffer
~b3 = Buffer.alloc(s, s.sampleRate * 4, 1); // Allocate a 3 second mono buffer
~b4 = Buffer.alloc(s, s.sampleRate * 4, 1); // Allocate a 3 second mono buffer
~b5 = Buffer.alloc(s, s.sampleRate * 4, 1); // Allocate a 3 second mono buffer
~b6 = Buffer.alloc(s, s.sampleRate * 4, 1); // Allocate a 3 second mono buffer
~b7 = Buffer.alloc(s, s.sampleRate * 4, 1); // Allocate a 3 second mono buffer
~b8 = Buffer.alloc(s, s.sampleRate * 4, 1); // Allocate a 3 second mono buffer
// SETUP OSC --------------------------------------
// Open port 57121 for ESP32 UDP OSC
thisProcess.openUDPPort(57121);
// allocate busses
// create group order
~micGrp = Group.new;
~recGrp = Group.after(~micGrp);
~smpGrp = Group.after(~recGrp);
// Setup MIDI
MIDIClient.init;
MIDIIn.connectAll;
//MIDIOut.connectAll;
~m32_1 = MIDIOut.newByName("MidiSport 4x4", "MidiSport 4x4 MIDI 1").latency_(Server.default.latency);
~m32_2 = MIDIOut.newByName("MidiSport 4x4", "MidiSport 4x4 MIDI 2").latency_(Server.default.latency);
g = Group.new;
SynthDef.new(\mic, {
arg in=0, out=0, amp=1;
var sig;
sig = SoundIn.ar(in) * amp;
Out.ar(out, sig);
}).add;
// mono buffer recorder ----------------------------
// with loop and overdub modes /////////////////////
//////////////////////////////////////////////////////////////////
SynthDef.new(\recBuf,{
arg micIn=2, buf=~b1, t_trig=0, l=0, overdub=0;
var sig, ptr, chain, onsets;
//ptr = In.ar(ptrIn, 1);
sig = SoundIn.ar(micIn, 1);
// Onsets
//chain = FFT(LocalBuf(512), sig);
//onsets = Onsets.kr(chain, MouseX.kr(0,1), \rcomplex);
RecordBuf.ar(sig, buf,
loop:l,
recLevel: 1,
preLevel: overdub,
doneAction: 0, trigger:t_trig,
offset: 0);
}).add;
//////////////////////////////////////////////////////////////////
SynthDef.new(\sampler, {
arg out=0, ploc=0, rate=1, buf=~b1, pos=10000, trate=100, amp=0.7;
var sig, dur, clk, pan;
// trate = //MouseY.kr(8,120,1);
dur = 12 / trate;
clk = Impulse.kr(trate);
// pos = position
// pos = MouseX.kr(0,BufDur.kr(b)) + TRand.kr(0, 0.01, clk);
pan = WhiteNoise.kr(0.6);
sig = TGrains.ar(2, clk, buf, rate, pos, dur, pan, amp * 0.20);
Out.ar(out, sig);
}).add;
//////////////////////////////////////////////////////////////////
SynthDef.new(\sine, {
| freq=1, atk=1, rel=1, pspd=0.1, ppos=0.8, release = 1, amp = 1, envc=0, gate = 0, beat=0.2 |
var bal, soundL, soundR, cc1, cc2, cc3;
var env = Env.new([0,1,0], [atk, rel], [1, -1]); //.circle(envc); TODO
var gen = EnvGen.kr(env, gate, doneAction: 2);
cc1 = \cc1.kr(0.5); // a control called cc1
cc2 = \cc2.kr(0.5); // a control called cc1
cc3 = \cc2.kr(0.5); // a control called cc1
/* soundL = SinOsc.ar(freq + (cc1 + cc2 ));
soundR = SinOsc.ar(freq + (cc1 + cc2 + cc3 ));*/
soundL = SinOsc.ar(freq + (cc1 + cc2 ));
soundR = SinOsc.ar(freq + beat );
bal = Balance2.ar(soundL, soundR, FSinOsc.kr(pspd, ppos));
Out.ar(0, bal * gen *0.1);
}).add;
//////////////////////////////////////////////////////////////
// DOEPFER POCKET DIAL MIDI CONTROLLER
////MIDI FOR ENVELOPED BEATIMG SINE WAVES //////////////////////////////////////////////////////////////
~rndp = 0; ~tune = 0; ~beat = 0;
MIDIFunc.cc({|val, ccNum, chan, src|
val.postln;
~synth = Synth.new(\sine, [ \freq, exprand(50,4000), \atk, rrand(0.5,3), \rel, rrand(4,23), \ppos, rrand(-0.8,0.8), \pspd, rrand(0.02,0.3)], g);
~synth.set(\gate, 0); ~synth.set(\gate, 1, \cc1, ~rndp); ~tune = 0; ~beat = 0;
}, ccNum:10, chan:0);
MIDIFunc.cc({|val, ccNum, chan, src|
~tune = ~tune + 1;
val.postln;
~synth.set(\cc2, ~tune);
}, ccNum:10, chan:1);
MIDIFunc.cc({|val, ccNum, chan, src|
val.postln;
~beat = ~beat + 1;
//~synth.set(\cc3, ~beat);
g.set(\beat, rrand(0.02,3))
}, ccNum:10, chan:8);
MIDIFunc.cc({|val, ccNum, chan, src|
val.postln;
~synth = Synth.new(\sine, [
\midinote, 33,
\harmonic, exprand(1,80).round,
\atk, rrand(0.5,3), \rel, rrand(4,23),
\ppos, rrand(-0.8,0.8)], g);
~synth.set(\gate, 0);
~synth.set(\gate, 1, \cc1, ~rndp);
~tune = 0;
~beat = 0;
}, ccNum:10, chan:9);
///////////////////////////
MIDIFunc.cc({|val, ccNum, chan, src| val.postln; ~s1.set( \rate, rrand(1,12)); }, ccNum:10, chan:2);
//////////////////////////////////////////////////////////////
///// KORG NANO CONTROLER ////////////////////////////////////
// MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; });
n = MIDIFunc.cc({arg ...args; args.postln}); // match any noteOn
// GRANULAR SAMPLER CONTROLS (4 INSTANCES )
// SLIDERS
MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; ("A: AMP" + val).postln; ~s1.set( \amp, val); }, ccNum:0, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; ("B: AMP" + val).postln; ~s2.set( \amp, val); }, ccNum:1, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; ("C: AMP" + val).postln; ~s3.set( \amp, val); }, ccNum:2, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; ("D: AMP" + val).postln; ~s4.set( \amp, val); }, ccNum:3, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; ("E: AMP" + val).postln; ~s5.set( \amp, val); }, ccNum:4, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; ("F: AMP" + val).postln; ~s6.set( \amp, val); }, ccNum:5, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; ("G: AMP" + val).postln; ~s7.set( \amp, val); }, ccNum:6, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; ("H: AMP" + val).postln; ~s8.set( \amp, val); }, ccNum:7, chan:2);
// RANDOM RATE TRIGGERS /////////
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s1.set(\rate, rrand(0.5,10)); "A: rate random!".postln; } { ~s1.set(\rate, 1); "A: trate random OFF".postln; } }, ccNum:32, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s2.set(\rate, rrand(0.5,10)); "A: rate random!".postln; } { ~s2.set(\rate, 1); "B: trate random OFF".postln; } }, ccNum:33, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s3.set(\rate, rrand(0.5,10)); "A: rate random!".postln; } { ~s3.set(\rate, 1); "C: trate random OFF".postln; } }, ccNum:34, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s4.set(\rate, rrand(0.5,10)); "A: rate random!".postln; } { ~s4.set(\rate, 1); "D: trate random OFF".postln; } }, ccNum:35, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s5.set(\rate, rrand(0.5,10)); "A: rate random!".postln; } { ~s5.set(\rate, 1); "E: trate random OFF".postln; } }, ccNum:36, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s6.set(\rate, rrand(0.5,10)); "A: rate random!".postln; } { ~s6.set(\rate, 1); "F: trate random OFF".postln; } }, ccNum:37, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s7.set(\rate, rrand(0.5,10)); "A: rate random!".postln; } { ~s7.set(\rate, 1); "G: trate random OFF".postln; } }, ccNum:38, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s8.set(\rate, rrand(0.5,10)); "A: rate random!".postln; } { ~s8.set(\rate, 1); "H: trate random OFF".postln; } }, ccNum:39, chan:2);
// RANDOM TRATE TRIGGERS /////////
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s1.set(\trate, rrand(1,100)); "A: trate random!".postln; } { ~s1.set(\trate, 1); "A: trate random OFF".postln; } }, ccNum:48, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s2.set(\trate, rrand(1,100)); "B: trate random!".postln; } { ~s2.set(\trate, 1); "B: trate random OFF".postln; } }, ccNum:49, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s3.set(\trate, rrand(1,100)); "C: trate random!".postln; } { ~s3.set(\trate, 1); "C: trate random OFF".postln; } }, ccNum:50, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s4.set(\trate, rrand(1,100)); "D: trate random!".postln; } { ~s4.set(\trate, 1); "D: trate random OFF".postln; } }, ccNum:51, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s5.set(\trate, rrand(1,100)); "E: trate random!".postln; } { ~s5.set(\trate, 1); "E: trate random OFF".postln; } }, ccNum:52, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s6.set(\trate, rrand(1,100)); "F: trate random!".postln; } { ~s6.set(\trate, 1); "F: trate random OFF".postln; } }, ccNum:53, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s7.set(\trate, rrand(1,100)); "G: trate random!".postln; } { ~s7.set(\trate, 1); "G: trate random OFF".postln; } }, ccNum:54, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s8.set(\trate, rrand(1,100)); "H: trate random!".postln; } { ~s8.set(\trate, 1); "H: trate random OFF".postln; } }, ccNum:55, chan:2);
// REC TRIGGERS /////////
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~r1.set(\t_trig, 1, \micIn, 2, \buf, ~b1, \l, 0, \overdub, 0 ); "A: SAMPLING!".postln; }}, ccNum:64, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~r2.set(\t_trig, 1, \micIn, 2, \buf, ~b2, \l, 0, \overdub, 0 ); "B: SAMPLING!".postln; }}, ccNum:65, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~r3.set(\t_trig, 1, \micIn, 2, \buf, ~b3, \l, 0, \overdub, 0 ); "C: SAMPLING!".postln; }}, ccNum:66, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~r4.set(\t_trig, 1, \micIn, 2, \buf, ~b4, \l, 0, \overdub, 0 ); "D: SAMPLING!".postln; }}, ccNum:67, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~r5.set(\t_trig, 1, \micIn, 2, \buf, ~b5, \l, 0, \overdub, 0 ); "A: SAMPLING!".postln; }}, ccNum:68, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~r6.set(\t_trig, 1, \micIn, 2, \buf, ~b6, \l, 0, \overdub, 0 ); "B: SAMPLING!".postln; }}, ccNum:69, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~r7.set(\t_trig, 1, \micIn, 0, \buf, ~b7, \l, 0, \overdub, 0 ); "C: SAMPLING!".postln; }}, ccNum:70, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~r8.set(\t_trig, 1, \micIn, 0, \buf, ~b8, \l, 0, \overdub, 0 ); "D: SAMPLING!".postln; }}, ccNum:71, chan:2);
// POTS
MIDIFunc.cc({|val, ccNum, chan, src| val = rrand(0, ~b1.duration); ("A: POS" + val.postln; ~s1.set( \pos, val))} , ccNum:16, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = rrand(0, ~b2.duration); ("B: POS" + val.postln; ~s2.set( \pos, val))} , ccNum:17, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = rrand(0, ~b3.duration); ("C: POS" + val.postln; ~s3.set( \pos, val))} , ccNum:18, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = rrand(0, ~b4.duration); ("D: POS" + val.postln; ~s4.set( \pos, val))} , ccNum:19, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = rrand(0, ~b5.duration); ("E: POS" + val.postln; ~s5.set( \pos, val))} , ccNum:20, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = rrand(0, ~b6.duration); ("F: POS" + val.postln; ~s6.set( \pos, val))} , ccNum:21, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = rrand(0, ~b7.duration); ("G: POS" + val.postln; ~s7.set( \pos, val))} , ccNum:22, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = rrand(0, ~b8.duration); ("H: POS" + val.postln; ~s8.set( \pos, val))} , ccNum:23, chan:2);
//////////////////////////////////////////////////////////////
// OSC SETUP AND CONFIG FOR TACTUS SINE WAVE PLAYER
//////////////////////////////////////////////////////////////
p = OSCFunc({ arg msg, time;
postln(msg );
/// mesages from tetractys esp32
// 3C:E9:0E:AD:E5:00
// 48:E7:29:C3:EF:BC - tetractys
if (msg[1] == '3C:E9:0E:AD:E2:E8') { // use esp32 mac address to determine source of msg
postln("from tetratys esp32 " + msg );
w = case
{ msg[2] == 0} {
postln("1" + msg[2] );
~synth = Synth.new(\sine, [
\freq, exprand(50,400),
\atk, rrand(0.5,3), \rel, rrand(4,23),
\ppos, rrand(-0.8,0.8),
\pspd, rrand(0.02,0.3)
], g);
~synth.set(\gate, 0); ~synth.set(\gate, 1, \cc1, ~rndp); ~tune = 0; ~beat = 0;
postln("0" + msg[2] );
}
{ msg[2] == 1} {
postln("1" + msg[2] );
~synth = Synth.new(\sine, [
\freq, exprand(50,4000),
\atk, rrand(0.5,3), \rel, rrand(4,23),
\ppos, rrand(-0.8,0.8),
\pspd, rrand(0.02,0.3)
], g);
~synth.set(\gate, 0); ~synth.set(\gate, 1, \cc1, ~rndp); ~tune = 0; ~beat = 0;
}
{ msg[2] == 2} {
postln("2" + msg[2] );
}
{ msg[2] == 3} {
postln("3" + msg[2] );
}
{ msg[2] == 4} {
postln("4" + msg[2] );
}
{ msg[2] == 5} {
postln("5" + msg[2] );
}
{ msg[2] == 6} {
postln("6" + msg[2] );
}
{ msg[2] == 7} {
postln("6" + msg[2] );
~synth = Synth.new(\sine, [
\freq, exprand(4000,8000),
\atk, rrand(0.5,3), \rel, rrand(4,23),
\ppos, rrand(-0.8,0.8),
\pspd, rrand(0.02,0.3)
], g);
//~synth.set([\gate, 0]);
//
~synth.set(\gate, 0);
~synth.set(\gate, 1, \cc1, ~rndp);
~tune = 0;
~beat = 0;
}
};
},'/touch_121_A');
s.sync;
s.wait(2);
}; // END OF WAIT FOR SERVER BOOT
(
// recorders
~r1 = Synth(\recBuf, [\micIn, 2, \buf, ~b1, \t_trig, 1, \l, 0, \overdub, 0], ~recGrp);
~r2 = Synth(\recBuf, [\micIn, 2, \buf, ~b2, \t_trig, 1, \l, 0, \overdub, 0], ~recGrp);
~r3 = Synth(\recBuf, [\micIn, 2, \buf, ~b3, \t_trig, 1, \l, 0, \overdub, 0], ~recGrp);
~r4 = Synth(\recBuf, [\micIn, 2, \buf, ~b4, \t_trig, 1, \l, 0, \overdub, 0], ~recGrp);
~r5 = Synth(\recBuf, [\micIn, 2, \buf, ~b5, \t_trig, 1, \l, 0, \overdub, 0], ~recGrp);
~r6 = Synth(\recBuf, [\micIn, 2, \buf, ~b6, \t_trig, 1, \l, 0, \overdub, 0], ~recGrp);
~r7 = Synth(\recBuf, [\micIn, 2, \buf, ~b7, \t_trig, 1, \l, 0, \overdub, 0], ~recGrp);
~r8 = Synth(\recBuf, [\micIn, 0, \buf, ~b8, \t_trig, 1, \l, 0, \overdub, 0], ~recGrp);
// samplers
~s1 = Synth(\sampler, [ \pos, 0, \trate, 1, \buf, ~b1, \amp, 0 ], ~smpGrp);
~s2 = Synth(\sampler, [ \pos, 0, \trate, 1, \buf, ~b2, \amp, 0 ], ~smpGrp);
~s3 = Synth(\sampler, [ \pos, 0, \trate, 1, \buf, ~b3, \amp, 0 ], ~smpGrp);
~s4 = Synth(\sampler, [ \pos, 0, \trate, 1, \buf, ~b4, \amp, 0 ], ~smpGrp);
~s5 = Synth(\sampler, [ \pos, 0, \trate, 1, \buf, ~b5, \amp, 0 ], ~smpGrp);
~s6 = Synth(\sampler, [ \pos, 0, \trate, 1, \buf, ~b6, \amp, 0 ], ~smpGrp);
~s7 = Synth(\sampler, [ \pos, 0, \trate, 1, \buf, ~b7, \amp, 0 ], ~smpGrp);
~s8 = Synth(\sampler, [ \pos, 0, \trate, 1, \buf, ~b8, \amp, 0 ], ~smpGrp);
);
///////////////////////////////////////////////////////////////////
// TODO make sure jack reconnects midi interface to mothers after server restart
a = PatternProxy(Prand([1, 2, 3, 6,8,9 ], inf));
b = PatternProxy(Pseq([4, 5, 6], inf));
~a1 = PatternProxy(Pseq([1, 2, 3], inf));
~b1 = PatternProxy(Pseq([3, 4, 5,7], inf));
(
Pdefn(\m1, Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_1,
\root, 0, \scale, Scale.minor,
\degree, a,
\octave, b,
//Pwrand([6,7,8], [25, 50, 25].normalizeSum, inf),
\dur, 1/2
)).play;
Pdefn(\m2, Pbind( \type, \midi, \midicmd, \noteOn, \midiout, ~m32_2,
\root, 0, \scale, Scale.minor,
\degree, ~a1,
\octave, ~b1,
//Pwrand([6,7,8], [25, 50, 25].normalizeSum, inf),
\dur, 1/2
)).play;
);
a.source = Prand([4, 5,6,7], inf);
b.source = Prand([4, 5,6], inf);
//
Pdef(\m1).play(quant: 4);
Pdef(\m2).play(quant: 4);
//Pdef(\m1).play(quant: 4);
Pdef(\m2).play(quant: 4);
a.source = Prand([4, 2, 3,1,7], inf);
~a1.source = Prand([4, 2, 3,1,7], inf);
b.source = Pseq([6,8,5,7], inf);
~b1.source = Prand([4,3,5,7], inf);
~b1.source = Prand([2,3,4], inf);
b.source = Pseq([1, 2,3,4], inf);
b.source = Prand([1, 3, 4, 5], inf);
b.source = Prand([3, 5], inf);
Pdef(\m1).stop;
Pdef(\m1).stop;
//
// Pdef(\m2).play(quant: 4); // TOP MOTHER
//
// Pbindef(\m2, \octave, 6);
//
//
// Pbindef(\m2, \octave, 3);
//
// Pbindef(\m2, \octave, 3);
//
//
//
z = Pseq([ // START SEQUENCER
Ppar( [~m1, ~m2], 8 ) // chromatic slides
], 1 ).play(~t1, quant:1);
// CONTROLS ----------------------
c.play();
z.pause;
z.stop;
c.start;
z.resume;
~r1.set(\t_trig, 1, \micIn, 2, \buf, ~b1, \l, 1, \overdub, 0 ); "/////////// SAMPLING!".postln;
~r2.set(\t_trig, 1, \micIn, 2, \buf, ~b2, \l, 1, \overdub, 0 ); "/////////// SAMPLING!".postln;
~r3.set(\t_trig, 1, \micIn, 2, \buf, ~b3, \l, 1, \overdub, 0 ); "/////////// SAMPLING!".postln;
~r4.set(\t_trig, 1, \micIn, 2, \buf, ~b4, \l, 1, \overdub, 0 ); "/////////// SAMPLING!".postln;
~s1.set( \pos, 4111);
~s1.set( \trate, rrand(1,1));
~s1.set( \rate, exprand(0.4, 10));
~s2.set( \pos, 44111);
~s2.set( \trate, 0.1);
~s2.set( \rate, 1);
~s3.set( \pos, 45511);
~s3.set( \trate, 1);
~s3.set( \rate, 0.25);
~s1.free;

View File

@ -0,0 +1,55 @@
// /*RUUUUUUN*/
(
// record into buffers
~r1 = Synth(\recBuf, [\micIn, 2, \buf, ~b1, \t_trig, 1, \l, 0, \overdub, 0], ~recGrp);
~r2 = Synth(\recBuf, [\micIn, 2, \buf, ~b2, \t_trig, 1, \l, 0, \overdub, 0], ~recGrp);
~r3 = Synth(\recBuf, [\micIn, 2, \buf, ~b3, \t_trig, 1, \l, 0, \overdub, 0], ~recGrp);
~r4 = Synth(\recBuf, [\micIn, 2, \buf, ~b4, \t_trig, 1, \l, 0, \overdub, 0], ~recGrp);
~r5 = Synth(\recBuf, [\micIn, 2, \buf, ~b5, \t_trig, 1, \l, 0, \overdub, 0], ~recGrp);
~r6 = Synth(\recBuf, [\micIn, 2, \buf, ~b6, \t_trig, 1, \l, 0, \overdub, 0], ~recGrp);
~r7 = Synth(\recBuf, [\micIn, 2, \buf, ~b7, \t_trig, 1, \l, 0, \overdub, 0], ~recGrp);
~r8 = Synth(\recBuf, [\micIn, 0, \buf, ~b8, \t_trig, 1, \l, 0, \overdub, 0], ~recGrp);
// granulating sample players
~s1 = Synth(\sampler, [ \pos, 0, \trate, 1, \buf, ~b1, \amp, 0 ], ~smpGrp);
~s2 = Synth(\sampler, [ \pos, 0, \trate, 1, \buf, ~b2, \amp, 0 ], ~smpGrp);
~s3 = Synth(\sampler, [ \pos, 0, \trate, 1, \buf, ~b3, \amp, 0 ], ~smpGrp);
~s4 = Synth(\sampler, [ \pos, 0, \trate, 1, \buf, ~b4, \amp, 0 ], ~smpGrp);
~s5 = Synth(\sampler, [ \pos, 0, \trate, 1, \buf, ~b5, \amp, 0 ], ~smpGrp);
~s6 = Synth(\sampler, [ \pos, 0, \trate, 1, \buf, ~b6, \amp, 0 ], ~smpGrp);
~s7 = Synth(\sampler, [ \pos, 0, \trate, 1, \buf, ~b7, \amp, 0 ], ~smpGrp);
~s8 = Synth(\sampler, [ \pos, 0, \trate, 1, \buf, ~b8, \amp, 0 ], ~smpGrp);
);
///////////////////////////////////////////////////////////////////
(
~m32_1.allNotesOff(0);
~m32_2.allNotesOff(0);
Pbindef(\m1, \type, \midi, \midicmd, \noteOn, \midiout, ~m32_1, \root, 0, \scale, Scale.minor, \degree, 0, \octave, 4, \dur, 1/4).play;
Pbindef(\m2, \type, \midi, \midicmd, \noteOn, \midiout, ~m32_2, \root, 0, \scale, Scale.minor, \degree, 0, \octave, 4, \dur, 1/4).play;
Pbindef(\m1).stop;
Pbindef(\m2).stop;
);
Pbindef(\a, \instrument, \sineSeq, \degree, Pseq([1, 2, 3, 4,5,6,7,8], inf), \gate, 1, \dur, 1/2, \sustain, 10).play;
Pbindef(\a, \instrument, \sineSeq).stop;

View File

@ -0,0 +1,528 @@
/*RUN*/
OSCFunc.trace(true); // Turn posting on
OSCFunc.trace(false); // Turn posting off
// Setup MIDI
MIDIClient.init;
MIDIIn.connectAll;
Server.default.waitForBoot { // see below .bundle timings for starting synths etc.
~b1 = Buffer.alloc(s, s.sampleRate * 4, 1); // Allocate a 3 second mono buffer
~b2 = Buffer.alloc(s, s.sampleRate * 4, 1); // Allocate a 3 second mono buffer
~b3 = Buffer.alloc(s, s.sampleRate * 4, 1); // Allocate a 3 second mono buffer
~b4 = Buffer.alloc(s, s.sampleRate * 4, 1); // Allocate a 3 second mono buffer
~b5 = Buffer.alloc(s, s.sampleRate * 4, 1); // Allocate a 3 second mono buffer
~b6 = Buffer.alloc(s, s.sampleRate * 4, 1); // Allocate a 3 second mono buffer
~b7 = Buffer.alloc(s, s.sampleRate * 4, 1); // Allocate a 3 second mono buffer
~b8 = Buffer.alloc(s, s.sampleRate * 4, 1); // Allocate a 3 second mono buffer
// SETUP OSC --------------------------------------
// Open port 57121 for ESP32 UDP OSC
thisProcess.openUDPPort(57121);
// allocate busses ----------------------------
// create group order
g = Group.new;
~micGrp = Group.new;
~recGrp = Group.after(~micGrp);
~smpGrp = Group.after(~recGrp);
//MIDIOut.connectAll;
~m32_1 = MIDIOut.newByName("MidiSport 4x4", "MidiSport 4x4 MIDI 1").latency_(Server.default.latency);
~m32_2 = MIDIOut.newByName("MidiSport 4x4", "MidiSport 4x4 MIDI 2").latency_(Server.default.latency);
// SYNTH DEFS //////////////////////////////////////
SynthDef.new(\mic, {
arg in=0, out=0, amp=1;
var sig;
sig = SoundIn.ar(in) * amp;
Out.ar(out, sig);
}).add;
// mono buffer recorder ----- with loop and overdub modes //////////////
SynthDef.new(\recBuf,{
arg micIn=2, buf=~b1, t_trig=0, l=0, overdub=0;
var sig, ptr, chain, onsets;
//ptr = In.ar(ptrIn, 1);
sig = SoundIn.ar(micIn, 1);
RecordBuf.ar(sig, buf,
loop:l,
recLevel: 1,
preLevel: overdub,
doneAction: 0, trigger:t_trig,
offset: 0);
}).add;
//////////////////////////////////////////////////////////////////
SynthDef.new(\sampler, {
arg out=0, ploc=0, rate=1, buf=~b1, pos=10000, trate=100, amp=0.7;
var sig, dur, clk, pan;
// trate = //MouseY.kr(8,120,1);
dur = 12 / trate;
clk = Impulse.kr(trate);
// pos = position
// pos = MouseX.kr(0,BufDur.kr(b)) + TRand.kr(0, 0.01, clk);
pan = WhiteNoise.kr(0.6);
sig = TGrains.ar(2, clk, buf, rate, pos, dur, pan, amp * 0.20);
Out.ar(out, sig);
}).add;
SynthDef.new(\sine, {
| freq=1, atk=1, rel=1, pspd=0.1, ppos=0.8, release = 1, amp = 1, envc=0, gate = 0, beat=0.2 |
var bal, soundL, soundR, cc1, cc2, cc3;
var env = Env.new([0,1,0], [atk, rel], [1, -1]); //.circle(envc); TODO
var gen = EnvGen.kr(env, gate, doneAction: 2);
cc1 = \cc1.kr(0.5); // a control called cc1
cc2 = \cc2.kr(0.5); // a control called cc1
cc3 = \cc2.kr(0.5); // a control called cc1
/* soundL = SinOsc.ar(freq + (cc1 + cc2 ));
soundR = SinOsc.ar(freq + (cc1 + cc2 + cc3 ));*/
soundL = SinOsc.ar(freq + (cc1 + cc2 ));
soundR = SinOsc.ar(freq + beat );
bal = Balance2.ar(soundL, soundR, FSinOsc.kr(pspd, ppos));
Out.ar(0, bal * gen *0.1);
}).add;
SynthDef("sineSeq", { arg out, freq, atk=0.1, sustain=1, amp=1, pan;
var env, u=1;
env = EnvGen.kr(Env.perc(atk, sustain), 1, doneAction: Done.freeSelf);
// 1.do { var d; d = exprand(1, 1); u = SinOsc.ar(d * 300, u, rrand(0.1,1.2) * d, 1) };
Out.ar(out, Pan2.ar(SinOsc.ar(freq, 0, amp * env), pan));
}).add;
//////////////////////////////////////////////////////////////
// DOEPFER POCKET DIAL MIDI CONTROLLER
////MIDI FOR ENVELOPED BEATIMG SINE WAVES //////////////////////////////////////////////////////////////
~rndp = 0; ~tune = 0; ~beat = 0;
MIDIFunc.cc({|val, ccNum, chan, src|
val.postln;
~synth = Synth.new(\sine, [ \freq, exprand(50,4000), \atk, rrand(0.5,3), \rel, rrand(4,23), \ppos, rrand(-0.8,0.8), \pspd, rrand(0.02,0.3)], g);
~synth.set(\gate, 0); ~synth.set(\gate, 1, \cc1, ~rndp); ~tune = 0; ~beat = 0;
}, ccNum:10, chan:0);
MIDIFunc.cc({|val, ccNum, chan, src|
~tune = ~tune + 1;
val.postln;
~synth.set(\cc2, ~tune);
}, ccNum:10, chan:1);
MIDIFunc.cc({|val, ccNum, chan, src|
val.postln;
~synth = Synth.new(\sine, [ \freq, 440, \atk, rrand(2,3), \rel, rrand(4,23), \ppos, rrand(-0.8,0.8), \pspd, rrand(0.02,0.3)], g);
~synth.set(\gate, 0); ~synth.set(\gate, 1, \cc1, ~rndp); ~tune = 0; ~beat = 0;
}, ccNum:10, chan:2);
/*
MIDIFunc.cc({|val, ccNum, chan, src|
val.postln;
~synth = Synth.new(\sine, [ \freq, exprand(50,4000), \atk, rrand(0.5,3), \rel, rrand(4,23), \ppos, rrand(-0.8,0.8), \pspd, rrand(0.02,0.3)], g);
~synth.set(\gate, 0); ~synth.set(\gate, 1, \cc1, ~rndp); ~tune = 0; ~beat = 0;
}, ccNum:10, chan:3);*/
MIDIFunc.cc({|val, ccNum, chan, src|
val.postln;
~beat = ~beat + 1;
//~synth.set(\cc3, ~beat);
g.set(\beat, rrand(0.02,3))
}, ccNum:10, chan:8);
MIDIFunc.cc({|val, ccNum, chan, src|
val.postln;
~synth = Synth.new(\sine, [
\midinote, 33,
\harmonic, exprand(1,80).round,
\atk, rrand(0.5,3), \rel, rrand(4,23),
\ppos, rrand(-0.8,0.8)], g);
~synth.set(\gate, 0);
~synth.set(\gate, 1, \cc1, ~rndp);
~tune = 0;
~beat = 0;
}, ccNum:10, chan:9);
///////////////////////////////////////////////////////////////////
MIDIFunc.cc({|val, ccNum, chan, src| val.postln; ~s1.set( \rate, rrand(1,12)); }, ccNum:10, chan:2);
///// KORG NANO CONTROLER ////////////////////////////////////
// MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; });
n = MIDIFunc.cc({arg ...args; args.postln}); // match any noteOn
// GRANULAR SAMPLER CONTROLS (4 INSTANCES )
// SLIDERS
MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; ("A: AMP" + val).postln; ~s1.set( \amp, val); }, ccNum:0, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; ("B: AMP" + val).postln; ~s2.set( \amp, val); }, ccNum:1, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; ("C: AMP" + val).postln; ~s3.set( \amp, val); }, ccNum:2, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; ("D: AMP" + val).postln; ~s4.set( \amp, val); }, ccNum:3, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; ("E: AMP" + val).postln; ~s5.set( \amp, val); }, ccNum:4, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; ("F: AMP" + val).postln; ~s6.set( \amp, val); }, ccNum:5, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; ("G: AMP" + val).postln; ~s7.set( \amp, val); }, ccNum:6, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = val/128; ("H: AMP" + val).postln; ~s8.set( \amp, val); }, ccNum:7, chan:2);
// RANDOM RATE TRIGGERS /////////
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s1.set(\rate, rrand(0.5,10)); "A: rate random!".postln; } { ~s1.set(\rate, 1); "A: trate random OFF".postln; } }, ccNum:32, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s2.set(\rate, rrand(0.5,10)); "A: rate random!".postln; } { ~s2.set(\rate, 1); "B: trate random OFF".postln; } }, ccNum:33, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s3.set(\rate, rrand(0.5,10)); "A: rate random!".postln; } { ~s3.set(\rate, 1); "C: trate random OFF".postln; } }, ccNum:34, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s4.set(\rate, rrand(0.5,10)); "A: rate random!".postln; } { ~s4.set(\rate, 1); "D: trate random OFF".postln; } }, ccNum:35, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s5.set(\rate, rrand(0.5,10)); "A: rate random!".postln; } { ~s5.set(\rate, 1); "E: trate random OFF".postln; } }, ccNum:36, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s6.set(\rate, rrand(0.5,10)); "A: rate random!".postln; } { ~s6.set(\rate, 1); "F: trate random OFF".postln; } }, ccNum:37, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s7.set(\rate, rrand(0.5,10)); "A: rate random!".postln; } { ~s7.set(\rate, 1); "G: trate random OFF".postln; } }, ccNum:38, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s8.set(\rate, rrand(0.5,10)); "A: rate random!".postln; } { ~s8.set(\rate, 1); "H: trate random OFF".postln; } }, ccNum:39, chan:2);
// RANDOM TRATE TRIGGERS /////////
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s1.set(\trate, rrand(1,100)); "A: trate random!".postln; } { ~s1.set(\trate, 1); "A: trate random OFF".postln; } }, ccNum:48, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s2.set(\trate, rrand(1,100)); "B: trate random!".postln; } { ~s2.set(\trate, 1); "B: trate random OFF".postln; } }, ccNum:49, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s3.set(\trate, rrand(1,100)); "C: trate random!".postln; } { ~s3.set(\trate, 1); "C: trate random OFF".postln; } }, ccNum:50, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s4.set(\trate, rrand(1,100)); "D: trate random!".postln; } { ~s4.set(\trate, 1); "D: trate random OFF".postln; } }, ccNum:51, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s5.set(\trate, rrand(1,100)); "E: trate random!".postln; } { ~s5.set(\trate, 1); "E: trate random OFF".postln; } }, ccNum:52, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s6.set(\trate, rrand(1,100)); "F: trate random!".postln; } { ~s6.set(\trate, 1); "F: trate random OFF".postln; } }, ccNum:53, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s7.set(\trate, rrand(1,100)); "G: trate random!".postln; } { ~s7.set(\trate, 1); "G: trate random OFF".postln; } }, ccNum:54, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~s8.set(\trate, rrand(1,100)); "H: trate random!".postln; } { ~s8.set(\trate, 1); "H: trate random OFF".postln; } }, ccNum:55, chan:2);
// REC TRIGGERS /////////
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~r1.set(\t_trig, 1, \micIn, 2, \buf, ~b1, \l, 0, \overdub, 0 ); "A: SAMPLING!".postln; }}, ccNum:64, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~r2.set(\t_trig, 1, \micIn, 2, \buf, ~b2, \l, 0, \overdub, 0 ); "B: SAMPLING!".postln; }}, ccNum:65, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~r3.set(\t_trig, 1, \micIn, 2, \buf, ~b3, \l, 0, \overdub, 0 ); "C: SAMPLING!".postln; }}, ccNum:66, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~r4.set(\t_trig, 1, \micIn, 2, \buf, ~b4, \l, 0, \overdub, 0 ); "D: SAMPLING!".postln; }}, ccNum:67, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~r5.set(\t_trig, 1, \micIn, 2, \buf, ~b5, \l, 0, \overdub, 0 ); "A: SAMPLING!".postln; }}, ccNum:68, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~r6.set(\t_trig, 1, \micIn, 2, \buf, ~b6, \l, 0, \overdub, 0 ); "B: SAMPLING!".postln; }}, ccNum:69, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~r7.set(\t_trig, 1, \micIn, 0, \buf, ~b7, \l, 0, \overdub, 0 ); "C: SAMPLING!".postln; }}, ccNum:70, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| if (val==1){ ~r8.set(\t_trig, 1, \micIn, 0, \buf, ~b8, \l, 0, \overdub, 0 ); "D: SAMPLING!".postln; }}, ccNum:71, chan:2);
// POTS
MIDIFunc.cc({|val, ccNum, chan, src| val = rrand(0, ~b1.duration); ("A: POS" + val.postln; ~s1.set( \pos, val))} , ccNum:16, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = rrand(0, ~b2.duration); ("B: POS" + val.postln; ~s2.set( \pos, val))} , ccNum:17, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = rrand(0, ~b3.duration); ("C: POS" + val.postln; ~s3.set( \pos, val))} , ccNum:18, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = rrand(0, ~b4.duration); ("D: POS" + val.postln; ~s4.set( \pos, val))} , ccNum:19, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = rrand(0, ~b5.duration); ("E: POS" + val.postln; ~s5.set( \pos, val))} , ccNum:20, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = rrand(0, ~b6.duration); ("F: POS" + val.postln; ~s6.set( \pos, val))} , ccNum:21, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = rrand(0, ~b7.duration); ("G: POS" + val.postln; ~s7.set( \pos, val))} , ccNum:22, chan:2);
MIDIFunc.cc({|val, ccNum, chan, src| val = rrand(0, ~b8.duration); ("H: POS" + val.postln; ~s8.set( \pos, val))} , ccNum:23, chan:2);
//////////////////////////////////////////////////////////////
// OSC SETUP AND CONFIG FOR TACTUS SINE WAVE PLAYER
p = OSCFunc({ arg msg, time;
// postln(msg );
if (msg[1] == '3C:E9:0E:AD:E2:E8') { // use esp32 mac address to determine source of msg
postln("from tetratys esp32 " + msg );
w = case
{ msg[2] == 0} {
postln("1" + msg[2] );
~synth = Synth.new(\sine, [
\freq, exprand(50,400),
\atk, rrand(0.5,3), \rel, rrand(4,23),
\ppos, rrand(-0.8,0.8),
\pspd, rrand(0.02,0.3)
], g);
~synth.set(\gate, 0); ~synth.set(\gate, 1, \cc1, ~rndp); ~tune = 0; ~beat = 0;
postln("0" + msg[2] );
}
{ msg[2] == 1} {
postln("1" + msg[2] );
~synth = Synth.new(\sine, [
\freq, exprand(50,4000),
\atk, rrand(0.5,3), \rel, rrand(4,23),
\ppos, rrand(-0.8,0.8),
\pspd, rrand(0.02,0.3)
], g);
~synth.set(\gate, 0); ~synth.set(\gate, 1, \cc1, ~rndp); ~tune = 0; ~beat = 0;
}
{ msg[2] == 2} {
~tfreq= [440,220,880,110, 55, 1760, 1760*2, 1760*3].choose;
postln("2; TUNING PITCH 440hz " + ~tfreq );
~synth = Synth.new(\sine, [
\freq, ~tfreq,
\atk, rrand(2,3), \rel, rrand(4,23),
\ppos, rrand(-0.8,0.8),
\pspd, rrand(0.02,0.3)
], g);
~synth.set(\gate, 0); ~synth.set(\gate, 1, \cc1, ~rndp); ~tune = 0; ~beat = 0;
}
{ msg[2] == 3} {
postln("1" + msg[2] + "chord [2]" );
2.do{
~synth = Synth.new(\sine, [
\freq, exprand(50,4000),
\atk, rrand(0.5,3), \rel, rrand(4,23),
\ppos, rrand(-0.8,0.8),
\tune, rrand(-3.8,3.8),
\pspd, rrand(0.02,0.3)
], g);
~synth.set(\gate, 0); ~synth.set(\gate, 1, \cc1, ~rndp); ~tune = 0; ~beat = 0;
};
}
{ msg[2] == 4} {
postln("1" + msg[2] + "chord [3]" );
3.do{
~synth = Synth.new(\sine, [
\freq, exprand(50,4000),
\atk, rrand(0.5,3), \rel, rrand(4,23),
\ppos, rrand(-0.8,0.8),
\tune, rrand(-3.8,3.8),
\pspd, rrand(0.02,0.3)
], g);
~synth.set(\gate, 0); ~synth.set(\gate, 1, \cc1, ~rndp); ~tune = 0; ~beat = 0;
};
}
{ msg[2] == 5} {
postln("1" + msg[2] + "chord [4]" );
4.do{
~synth = Synth.new(\sine, [
\freq, exprand(50,4000),
\atk, rrand(0.5,3), \rel, rrand(4,23),
\ppos, rrand(-0.8,0.8),
\tune, rrand(-3.8,3.8),
\pspd, rrand(0.02,0.3)
], g);
~synth.set(\gate, 0); ~synth.set(\gate, 1, \cc1, ~rndp); ~tune = 0; ~beat = 0;
};
}
{ msg[2] == 6} {
postln("6" + msg[2] + "4k - 10k Hz");
~synth = Synth.new(\sine, [
\freq, exprand(400,1000),
\atk, rrand(0.05,0.1), \rel, rrand(2,10),
\ppos, rrand(-0.8,0.8),
\pspd, rrand(0.02,0.3)
], g);
~synth.set(\gate, 0); ~synth.set(\gate, 1, \cc1, ~rndp); ~tune = 0; ~beat = 0;
}
{ msg[2] == 7} {
postln("7" + msg[2] + "4k - 10k Hz");
~synth = Synth.new(\sine, [
\freq, exprand(4000,10000),
\atk, rrand(0.5,3), \rel, rrand(4,23),
\ppos, rrand(-0.8,0.8),
\pspd, rrand(0.02,0.3)
], g);
~synth.set(\gate, 0); ~synth.set(\gate, 1, \cc1, ~rndp); ~tune = 0; ~beat = 0;
}
// TACTUS A - $ CONTROLS
{ msg[2] == 8} { postln("8" + msg[2] + "4k - 10k Hz"); }
{ msg[2] == 9} { postln("9" + msg[2] + "4k - 10k Hz"); }
{ msg[2] == 10} { postln("10" + msg[2] + "START SINE SEQUENCE");
Pbindef(\a, \instrument, \sineSeq,\scale, Scale.chromatic,
\degree, Pseq([0, 1, 2, 3, 4,5,6,7,8, 9 ,10,11 ], inf),
\octave, Prand([2, 3, 4,5,6,7,8], inf), \gate, 1,
\dur, Pwrand([4, 3, 2,1,1/2,1/4], [1,2,13,5,8,13].normalizeSum, inf),
\atk, Pwhite(0.01, 1),
\pan, Pwhite(-1, 1),
\sustain, Pwhite(0.2, 7.5)
).play;
}
{ msg[2] == 11} { postln("11" + msg[2] + "STOP SINE SEQUENCE");
Pbindef(\a, \instrument, \sineSeq).stop;
}
};
},'/touch_121_A');
///////////////////////////////////////////////////////////////////
MIDIFunc.cc({|val, ccNum, chan, src|
val = val%11;
w = case
{ val == 0} { x = [0]; postln("M1 RANDOM ARP: " + x ); ~pseq1 = Prand(x, inf); }
{ val == 1} { x = [0, 7]; postln("M1 RANDOM ARP: " + x ); ~pseq1 = Prand(x, inf); }
{ val == 2} { x = [0, 7, 3]; postln("M1 RANDOM ARP: " + x ); ~pseq1 = Prand(x, inf); }
{ val == 3} { x = [0, 7, 3 ,5]; postln("M1 RANDOM ARP: " + x ); ~pseq1 = Prand(x, inf); }
{ val == 4} { x = [0, 7, 3 , 5, 9]; postln("M1 RANDOM ARP: " + x ); ~pseq1 = Prand(x, inf); }
{ val == 5} { x = [0, 7, 3, 5, 9, 11]; postln("M1 RANDOM ARP: " + x ); ~pseq1 = Prand(x, inf); }
{ val == 6} { x = [0, 7, 3, 5, 9, 11]; postln("M1 ARP: " + x ); ~pseq1 = Pseq(x, inf); }
{ val == 7} { x = [0, 7, 3 , 5, 9]; postln("M1 ARP: " + x ); ~pseq1 = Pseq(x, inf); }
{ val == 8} { x = [0, 7, 3 ,5]; postln("M1 ARP: " + x ); ~pseq1 = Pseq(x, inf); }
{ val == 9} { x = [0, 7, 3]; postln("M1 ARP: " + x ); ~pseq1 = Pseq(x, inf); }
{ val == 10} { x = [0, 7]; postln("M1 ARP: " + x ); ~pseq1 = Pseq(x, inf); }
}, ccNum:10, chan:4);
MIDIFunc.cc({|val, ccNum, chan, src|
val = val%11;
w = case
{ val == 0} { x = [0]; postln("M2 RANDOM ARP: " + x ); ~pseq2 = Prand(x, inf); }
{ val == 1} { x = [0, 7]; postln("M2 RANDOM ARP: " + x ); ~pseq2 = Prand(x, inf); }
{ val == 2} { x = [0, 7, 3]; postln("M2 RANDOM ARP: " + x ); ~pseq2 = Prand(x, inf); }
{ val == 3} { x = [0, 7, 3 ,5]; postln("M2 RANDOM ARP: " + x ); ~pseq2 = Prand(x, inf); }
{ val == 4} { x = [0, 7, 3 , 5, 9]; postln("M2 RANDOM ARP: " + x ); ~pseq2 = Prand(x, inf); }
{ val == 5} { x = [0, 7, 3, 5, 9, 11]; postln("M2 RANDOM ARP: " + x ); ~pseq2 = Prand(x, inf); }
{ val == 6} { x = [0, 7, 3, 5, 9, 11]; postln("M2 ARP: " + x ); ~pseq2 = Pseq(x, inf); }
{ val == 7} { x = [0, 7, 3 , 5, 9]; postln("M2 ARP: " + x ); ~pseq2 = Pseq(x, inf); }
{ val == 8} { x = [0, 7, 3 ,5]; postln("M2 ARP: " + x ); ~pseq2 = Pseq(x, inf); }
{ val == 9} { x = [0, 7, 3]; postln("M2 ARP: " + x ); ~pseq2 = Pseq(x, inf); }
{ val == 10} { x = [0, 7]; postln("M2 ARP: " + x ); ~pseq2 = Pseq(x, inf); }
}, ccNum:10, chan:12);
// set the central octave / register
MIDIFunc.cc({|val, ccNum, chan, src|
val = val%6;
w = case
{ val == 0} { x = [0]; postln("M1 OCTAVE: " + x ); ~poct1 = Prand(x, inf); }
{ val == 1} { x = [0, 1]; postln("M1 OCTAVE: " + x ); ~poct1 = Prand(x, inf); }
{ val == 2} { x = [0, 1, 2]; postln("M1 OCTAVE: " + x ); ~poct1 = Prand(x, inf); }
{ val == 3} { x = [0, 1, 2]; postln("M1 OCTAVE: " + x ); ~poct1 = Prand(x, inf); }
{ val == 4} { x = [0, 1, 2, 3]; postln("M1 OCTAVE: " + x ); ~poct1 = Prand(x, inf); }
{ val == 5} { x = [0, 1, 2, 3, 4]; postln("M1 OCTAVE: " + x ); ~poct1 = Prand(x, inf); }
}, ccNum:10, chan:5);
MIDIFunc.cc({|val, ccNum, chan, src|
val = val%6;
w = case
{ val == 0} { x = [0]; postln("M1 OCTAVE: " + x ); ~poct2 = Prand(x, inf); }
{ val == 1} { x = [0, 1]; postln("M1 OCTAVE: " + x ); ~poct2 = Prand(x, inf); }
{ val == 2} { x = [0, 1, 2]; postln("M1 OCTAVE: " + x ); ~poct2 = Prand(x, inf); }
{ val == 3} { x = [0, 1, 2]; postln("M1 OCTAVE: " + x ); ~poct2 = Prand(x, inf); }
{ val == 4} { x = [0, 1, 2, 3]; postln("M1 OCTAVE: " + x ); ~poct2 = Prand(x, inf); }
{ val == 5} { x = [0, 1, 2, 3, 4]; postln("M1 OCTAVE: " + x ); ~poct2 = Prand(x, inf); };
}, ccNum:10, chan:13);
// set the central duration sequence
MIDIFunc.cc({|val, ccNum, chan, src|
val = val%11;
w = case
{ val == 0} { x = [1]; postln("M1 DURATIONS: " + x ); ~pdur1 = Pseq(x, inf); }
{ val == 1} { x = [1/2]; postln("M1 DURATIONS: " + x ); ~pdur1 = Pseq(x, inf); }
{ val == 2} { x = [1/3]; postln("M1 DURATIONS: " + x ); ~pdur1 = Pseq(x, inf); }
{ val == 3} { x = [1/4]; postln("M1 DURATIONS: " + x ); ~pdur1 = Pseq(x, inf); }
{ val == 4} { x = [1/5]; postln("M1 DURATIONS: " + x ); ~pdur1 = Pseq(x, inf); }
{ val == 5} { x = [1/5]; postln("M1 DURATIONS: " + x ); ~pdur1 = Pseq(x, inf); }
{ val == 6} { x = [1/6]; postln("M1 DURATIONS: " + x ); ~pdur1 = Pseq(x, inf); }
{ val == 7} { x = [1/7]; postln("M1 DURATIONS: " + x ); ~pdur1 = Pseq(x, inf); }
{ val == 8} { x = [1/8]; postln("M1 DURATIONS: " + x ); ~pdur1 = Pseq(x, inf); }
{ val == 9} { x = [1/16]; postln("M1 DURATIONS: " + x ); ~pdur1 = Pseq(x, inf); }
{ val == 10} { x = [3, 2, 1, 1/2, 1/4, 1/8]; postln("M1 DURATIONS: " + x ); ~pdur2 = Pwrand(x, [0.25, 0.5, 1, 3, 5, 8].normalizeSum, inf); };
}, ccNum:10, chan:6);
MIDIFunc.cc({|val, ccNum, chan, src|
val = val%11;
w = case
{ val == 0} { x = [1]; postln("M1 DURATIONS: " + x ); ~pdur2 = Pseq(x, inf); }
{ val == 1} { x = [1/2]; postln("M1 DURATIONS: " + x ); ~pdur2 = Pseq(x, inf); }
{ val == 2} { x = [1/3]; postln("M1 DURATIONS: " + x ); ~pdur2 = Pseq(x, inf); }
{ val == 3} { x = [1/4]; postln("M1 DURATIONS: " + x ); ~pdur2 = Pseq(x, inf); }
{ val == 4} { x = [1/5]; postln("M1 DURATIONS: " + x ); ~pdur2 = Pseq(x, inf); }
{ val == 5} { x = [1/5]; postln("M1 DURATIONS: " + x ); ~pdur2 = Pseq(x, inf); }
{ val == 6} { x = [1/6]; postln("M1 DURATIONS: " + x ); ~pdur2 = Pseq(x, inf); }
{ val == 7} { x = [1/7]; postln("M1 DURATIONS: " + x ); ~pdur2 = Pseq(x, inf); }
{ val == 8} { x = [1/8]; postln("M1 DURATIONS: " + x ); ~pdur2 = Pseq(x, inf); }
{ val == 9} { x = [1/16]; postln("M1 DURATIONS: " + x ); ~pdur2 = Pseq(x, inf); }
{ val == 10} { x = [3, 2, 1, 1/2, 1/4, 1/8]; postln("M1 DURATIONS: " + x ); ~pdur2 = Pwrand(x, [0.25, 0.5, 1, 3, 5, 8].normalizeSum, inf); };
}, ccNum:10, chan:14);
~poct1 = 3; ~oct1 = 0;
~poct2 = 3; ~oct2 = 0;
q = OSCFunc({ arg msg, time;
postln(msg );
if (msg[1] == '3C:E9:0E:AD:E2:E8') { // use esp32 mac address to determine source of msg
postln("from tetratys esp32 " + msg );
w = case
// tactus changes
{ msg[2] == 4} { postln("4" + msg[2] ); }
{ msg[2] == 5} {
postln("5" + msg[2] ); Pbindef(\m1, \dur, ~pdur1);} // initiate selected duration set
{ msg[2] == 6} { ~oct1 = ~oct1 + 1; ~oct1 = ~oct1%9;
postln("6" + msg[2] + ~oct1); Pbindef(\m1, \octave, ~poct1 + ~oct1);} // initiate selected octave set
{ msg[2] == 7} { postln("7" + msg[2] ); Pbindef(\m1, \degree, ~pseq1);} // initiate selected pitch set
// tactus 4 playback controls
{ msg[2] == 10} { postln("10" + msg[2] ); Pbindef(\m1).play; } // stop sequence
{ msg[2] == 11} { postln("11" + msg[2] ); Pbindef(\m1).stop; } // start sequence
// tactus changes
{ msg[2] == 0} { postln("0" + msg[2] ); }
{ msg[2] == 1} { postln("5" + msg[2] ); Pbindef(\m2, \dur, ~pdur2);} // initiate selected duration set
{ msg[2] == 2} {
~oct2 = ~oct2 + 1; ~oct2 = ~oct2%9;
postln("2" + msg[2] + ~oct2); Pbindef(\m2, \octave, ~poct2 + ~oct2);} // initiate selected octave set} // initiate selected octave set
{ msg[2] == 3} { postln("3" + msg[2] ); Pbindef(\m2, \degree, ~pseq2); } // initiate selected pitch set
// tactus 4 playback controls
{ msg[2] == 8} { postln("8" + msg[2] ); Pbindef(\m2).play; } // stop sequence
{ msg[2] == 9} { postln("9" + msg[2] ); Pbindef(\m2).stop; }; // start sequence
}},'/touch_121_B');
}; // END OF WAIT FOR SERVER BOOT