tales of autism…

First, give thanks:

“… to the Pd community and the pd-list for the great amount of things they allowed me to learn. To the Autistici/Inventati collective and to the PlanetQ project. To Husk ‘the trinacrian afro-gipsy’ for the impulses, the tips, the sea and the sun. To Ash016 for the tips, the hacks, the tricks, the knowledge share about audio, music and pure data.  To Cybergio and Giangio for the tips, the Lisp, the relax and the fun. To -miss 5am- for the blahblas about music, diy, technology and for the hc nights hanging ’round in Rome. To Graffio for everything he shared with me. Dedicated to all the squats all over the world. “

——-
“what you give is yours forever
what you keep you lose”
——-


| Intro |


The idea behind XmiX is to create a digital emulation of a classic mixer console for studio/live music production using exclusively free knowledges, free softwares, free thoughts, free consciousness, free interpretations, some beers, some rhum, some dope, and a lot of fun.

XmiX is written in Pure Data ‘vanilla’ 0.42.6 with the Martin Peach’s OSC objects compiled as an external (see the OSC objects guide) but you can obviously run it also on Pd-extended without change anything.

My focus is strictly oriented in using free, raw, and ‘standard’ tools but I tried it also on commercial operating systems and it works fine. In OSX it works also using my startup shell script, in Windowz you have to launch it from within Pd (see below).

XmiX is a full OSC oriented 8 tracks environment with client/server architecture over TCP/IP.

The client is XmiX_gui.pd the GUI,
it handles all midi/OSC events, the scenes settings saves/loads, the  events recording and the build/unbuild commands. The midi sequencer or whatever else you use to produce midi events has to talk with the gui. It starts pd with alsa-midi and no audio, talks in OSC with the server and converts midi events in OSC.

The server is XmiX_engine.pd the ENGINE,
it’s the core of the application where all the audio~ patches reside, it’s obviously the heaviest patch in XmiX in terms of cpu consuming.
The engine starts pd with realtime flag, optionally with the ‘-nogui‘ flag, with the oss/alsa audio and no midi.

Recently I developed a ‘multiprocess’ version of the engine using the [pd~] object. It starts 2 pd sub-processes (4 tracks per process) improving performance on multi-processor machines.

The client and the server are totally indipendent applications, it can be launched on separate network-connected machines or all-in-one on the same machine (…as two separate ‘localhost-connected’ pd instances).


| Startup |


I provide a bash shell script that launch the gui, the engine, or everything. You don’t have to setup paths in pd or libs or other, the script starts pd with the necessary options for XmiX, edit it and sets the correct paths or hack it or do waddafuckyawant.. :)

XmiX’s launch syntax:

./XmiX.sh
…starts all
./XmiX.sh -g <engine-ip-address>
…starts the GUI
./XmiX.sh -e <gui-ip-address>
…starts the ENGINE

we have two more optional flags only for the ENGINE:

  • ‘-n’ to starts it without X (nogui).
  • ‘-m’ to starts it in multiprocess mode ([pd~])

…a screenshot of the gui:

You can obviously start XmiX also from within Pd opening the “x_XMIX/XmiX_engine.pd” patch and then the “x_XMIX/XmiX_gui.pd” patch in another Pd instance.


| Connect |


Once started the client and the server we got to connect them. Click on ‘-–connect—‘ button at bottom-right side of the XmiX gui window. If the button’s name turns to ‘disconnect‘ the connection has been established and we can start to play.

Don’t forget to raise tha main volume and toggle the main mute or you’ll never hear any sound. Do this by clicking on MAIN button at top-right side of the XmiX gui window.


| Build your Deskset |


So when we started the server, started the client, connected the two, raised the main volume and unmuted, we can start to build our Deskset.

In every track you can choose a synthetizer, a midi tool, four side-effects and four post-effects from lists of available objects.

XmiX’s Desksets are files which describe the set of synths, effects, etc. for every tracks. Think of it as if you could freeze a particular set of hardware synths, effects, filters, etc. attached to your mixing console in your studio.

Note: Desksets files also saves the midi-channel maps into the 8 tracks, the midi CCs (Control Change) maps to the gui controls and the path of the various Controls Sets files (scenes) made with that particular Deskset.


| MIDI |


XmiX doesn’t genereate sound events by itself, you need a midi-capable hardware device or a software sequencer to play with it.

MIDI in XmiX is simply converted to OSC strings and sended to the engine at proper channel. On every track you can choose the midi channel it will receive by clicking on the midi button.

Note: “MIDI channels” are not the same as “XmiX channels”. MIDI channels are from 1 to 16 and everyone can be routed in one of the 8 XmiX’s channels.

Midi Control Changes (CC) can be quickly assigned to XmiX gui controls:

– click on MAIN button
– click on MIDI (..and it starts to blink)
– now move a single control in your hardware midi controller (…it should stop blinking)
– click on OSC button
– move a single gui control in XmiX’s gui.
– do this for all the controls you need to map

so, when you save the Deskset configuration this maps will be saved and
restored when you will reload your set.


| Save Settings |


as well as we can save (or load) the Deskset configuration we also can save/load the various controls, volumes, levels, envelopes values, lfo values etc… in XmiX this are called “Controls set”.

So we can save:

  • the Deskset –> a description of all choosed dynamic objects(effects, synths, etc…)
  • the Controls –> a description of all controls values inthat particular Deskset we choosed

NOTE: The Deskset file also contains all the MIDI settings (channels-to-tracks maps and CC-to-OSC maps) and indexes a set of 32 Controls files to quickly load the various “scenes” (or songs) of that Deskset.


| Save Sessions |


We can save our sessions as an audiofile (wav) or as a list of all gui’s events (controls moving, midi notes,…) with a time tag.

To write an audiofile:

click on MAIN button on the gui’s top-right side, use the REC/STOP button on the MAIN panel. The file will be written in /tmp/pdout.wav (or overwritten if you stop and then restart recording)

To record events:

click on the RECORDER button at right side of the gui, the events recorder will be opened… play, rec, stop, load, save… something to explain? :)


———–

… and now some technical
notes about XmiX, only for real nerds! :)

———–


| OSC tree and layers concept |


here’s the OSC structure.

The track is the atom of the project, see ‘x_track~-help.pd’ as an example (not well documented but I hope intuitive).

XmiX’s OSC tree:

         /
         |------ /ch1                                     <[TRACK_LAYER]
         |          |----- /midi                           <[MIDI_LAYER]
         |          |         |----- /channel <n>
         |          |         |
         |          |         |----- /note <note-n> <velocity-n>
         |          |         |
         |          |         |=====> /BUILD <tool-name>
         |          |         |
         |          |         |----- /<midi-tool>
         |          |                           |-----/...
         |          |
         |          |
         |          |=====> /BUILD <synth-name> <voices-n>
         |          |
         |          |----- /<synth-name>                  <[SYNTH_LAYER]
         |          |                 |----- /vcf
         |          |                 |----- /lfo
         |          |                 |----- /adsr
         |          |                 |----- /...
         |          |
         |          |
         |          |
         |          |----- /fx                          <[SIDE_FX_LAYER]
         |          |        |----- /send1 <n>
         |          |        |----- /send2 <n>
         |          |        |----- /send3 <n>
         |          |        |----- /send4 <n>
         |          |        |
         |          |        |----- /FX1
         |          |        |        |
         |          |        |        |=====> /BUILD <fx-name>
         |          |        |        |
         |          |        |        |----- /<fx-name>
         |          |        |                      |----- /...
         |          |        |
         |          |        |----- /FX2
         |          |        |        |
         |          |        |        |=====> /BUILD <fx-name>
         |          |        |        |
         |          |        |        |----- <fx-name>
         |          |        |                      |----- /...
         |          |        |
         |          |        |----- /FX3
         |          |        |        |
         |          |        |        |=====> /BUILD <fx-name>
         |          |        |        |
         |          |        |        |----- <fx-name>
         |          |        |                      |----- /...
         |          |        |
         |          |        |----- /FX4
         |          |                 |
         |          |                 |=====> /BUILD <fx-name>
         |          |                 |
         |          |                 |----- <fx-name>
         |          |                               |----- /...
         |          |
         |          |
         |          |
         |          |----- /postfx                      <[POST_FX_LAYER]
         |          |            |----- /dw1 <n>
         |          |            |----- /dw2 <n>
         |          |            |----- /dw3 <n>
         |          |            |----- /dw4 <n>
         |          |            |
         |          |            |
         |          |            |----- /FX1
         |          |            |         |
         |          |            |         |=====> /BUILD <fx-name>
         |          |            |         |
         |          |            |         |----- /<fx-name>
         |          |            |                        |----- /...
         |          |            |
         |          |            |----- /FX2
         |          |            |        |
         |          |            |        |=====> /BUILD <fx-name>
         |          |            |        |
         |          |            |        |----- <fx-name>
         |          |            |                      |----- /...
         |          |            |
         |          |            |----- /FX3
         |          |            |        |
         |          |            |        |=====> /BUILD <fx-name>
         |          |            |        |
         |          |            |        |----- <fx-name>
         |          |            |                      |----- /...
         |          |            |
         |          |            |----- /FX4
         |          |                     |
         |          |                     |=====> /BUILD <fx-name>
         |          |                     |
         |          |                     |----- <fx-name>
         |          |                                   |----- /...
         |          |
         |          |
         |          |----/mixer                           <[MIXER_LAYER]
         |                   |-----/clip
         |                   |-----/mute <n>
         |                   |-----/vol <n>
         |                   |-----/haas <n>
         |                   |-----/pan <n>
         |                   |-----/gain <n>
         |
         |
         |----- /ch2
         |         |-----/...
         |         .
         |         .
         |
         |----- /ch3
         |         |-----/...
         |         .
         .         .
         .
         .
         .
         |----- /ch8
         |         |-----/...
         |         .
         |         .
         |
         |----- /MASTER
                      |-----/BPM
                      |-----/clip
                      |-----/mute <n>
                      |-----/vol <n>
                      |-----/haas <n>
                      |-----/pan <n>
                      |-----/gain <n>

<n> = a number from 0 to 127.
<midi-tool>,
<synth-name>,
<fx-name> = see below.


| SYNTHETIZERS |


<synth-name> can be:

– x_additive —> my additive?! synthesis concept
– x_horco —> an ‘experimental?!?’ synth with 5 selectable waveforms to add,
subtract, multiply, divide, …
– x_smodulate —> my FM?! synthesis concept
– x_strings —> strings from DIY2 suite
– x_oxygen —> another synth from DIY2
– x_drum_BD1 —> Bass Drum synth
– x_drum_BD2 —> …another BD
– x_drum_SD1 —> Snare Drum synth
– x_drum_SD2 —> …another snare
– x_drum_HH1 —> Hihat Drum synth
– x_drum_HH2 —> …another
– x_sampler —> my simple sampler!?! concept
– x_grain —> a granular synth reworked from Jamie Bullock’s
‘a_grain.pd’ patches (included with LICENSE)
– x_mic —> a fake synth.. it handles audio mic/line input

| EFFECTS |


<fx-name> can be:

– x_delay —> my delay?! concept (with BPM sync delay time)
– x_overdrive —> an overdrive reworked from RjDj tools..i think
– x_vocoder —> my vocoding?! concept.. a rework of Miller Puckette examples patches
– x_reverb —> a reverb reworked from RjDj tools

… other fx reworked from Matt Davey’s DIY2 suite:

  • x_compressor
  • x_bitcrusher
  • x_bodyresonance
  • x_flanger
  • x_material
  • x_phaser
  • x_pitchshifter
  • x_shaper
  • x_wetfilter

| MIDI TOOLS |


<midi-tool> can be:

  • x_parpeggiator —> my arpeggio!? concept
  • … nothing else for now

| Global senders/receivers |


3 global senders/receivers:

  • OSC’ receiver –> takes OSC commands and sends it to XmiX
  • ALL_NOTES_OFF‘ sender –> sending a bang to it cause all synths to reset midi input
  • ‘BPM’ receiver –> take the global set BPM value to sync effects and LFOs

| BUILD/UNBUILD |


As you can see in the tree there are some ‘special’ OSC commands to dynamically build/destroy patches on-the-fly at different layers. With these commands we can choose to use: one midi-tool, one synthetizer, four side-chain effects and four post-fx for every track.

Building commands work by simply call:

/../../.../BUILD <name>

at proper layer. So as an example, to build the ‘x_delay’ effect as the second side-fx on channel 5 the XmiX’s gui does:

/ch5/fx/FX2/BUILD x_delay

and to destroy it:

/ch5/fx/FX2/BUILD clear

XmiX’s gui uses one more command to query builded objects when saving scenes configuration:

/ch5/fx/FX2/BUILD check

it returns an OSC string with the name of the builded object if exists.

Builds and unbuilds commands are completely handled by the XmiX’s gui or saved in scenes snapshot files. If you are interested in objects autobuilds see my ‘x_autobuilder.pd‘ patch (look at the help and I hope you understand :) )


| OSC’s globbing feature |


we can send OSC strings with globbing ‘*’ char to query/set multiple objects at the same time (actually it doesn’t works on all the XmiX’s OSC tree nodes, i’m testing…)

some examples:
- /ch1/fx/send* 0
– sets to 0 all fx sends on channel 1
- /ch*/fx/send* 0
– sets to 0 all fx sends on every channel
- /ch*/*
– get all sets values on every channel
- /ch*/BUILD clear
– clear all synth builds
- /ch*/postfx/FX3/BUILD clear
– clear postfx 3 on every channel

… so with:

- /ch*/fx/FX*/BUILD clear
– clear all fx builds on every channel
- /ch7/fx/FX*/BUILD clear
– clear all fx builds on channel 7
- /ch1/x_additive/*
– get all sets values on channel 1 synth x_additive
- /ch1/x_additive/vcf/adsr/* 32
– set to 32 all the vcf-adsr values on channel 1 in x_additive synth

… and so on… test test test…

The XmiX’s gui uses some of these strings to retrieve settings and building states when saving configurations.


| KNOWN BUGS |


  • many… I suppose

| CREDITS |


Mag-ONE – jan. 2011, Rome IT

refuse!
resist!
spread the love!