Pure Data Tutorial 3: Open Sound Module

This tutorial is a bit different to the previous tutorials. Instead of making a Pure Data patch to run on the OWL, we’ll be making a Pure Data patch that runs on your computer. The patch is a sequencer that lets you send triggers and CV as OSC (Open Sound Control) messages over WiFi to the Rebel Technology Open Sound Module. This opens up the door for lots of interesting ways of controlling modular synths from your computer (from Arduinos to biosenors!)

The tutorial relies on Pure Data 0.47-0, which is a different release to what we’ve previously used, but it’s free and has some essential objects for OSC. Download it here:

https://puredata.info/downloads/pure-data/releases/0.47-0

You can download the patch we’ll be building in this tutorial via Patchstorage:

http://patchstorage.com/rebel-technology-tutorial-3-open-sound-module/

1.) At the heart of the sequencer is a clock. The clock is driven by the [metro] object (remember you can always look at the “put” menu to add new objects or find keyboard shortcuts). [metro] outputs bangs at regular intervals set using the right inlet and/or the initial argument (the number written after metro – control click or right click an object to view the help file for more info like this about what inlets, arguments and messages they expect). We will give the [metro] an initial argument of 200, so it sends out bangs every 200ms. It can be turned on and off using a [toggle] object (which looks like a clickable square), and a number box connected to the right inlet allows us to change the initial value of 200 to speed up or slow down the sequencer.

metro2.) The metro outputs bangs, and we need to convert those into numbers to step through our sequencer, so we need to make a counter. We do this with the float object (written as [f] or [float]) and the [+] object. The [+] object needs an argument of 1 (ie [+ 1]), so it adds 1 to any number that enters the left inlet. The [f] object stores numbers that it receives in the right inlet, and outputs them when it receives a bang in the left inlet. If we connect the bangs from the outlet of [metro] into the left inlet of [f], connect the outlet of [f] to the input of [+], and send the output of [+] into the right (or “store”) inlet of [f], then we have a simple counter coming from the outlet of [f].

float3.) The only problem with this counter is that it keeps on counting, and we want it to repeatedly go through the 8 steps of our sequence. The object that will let us do this is [mod]. This object divides the input by the argument and outputs the remainder. Therefore, [mod 8] will make our counter cycle from 0 to 7. We are going to use this master clock throughout the sequencer, so we use the [send] or [s] object, and in this case call it clock, so the object is [s clock]. This means wherever we put [receive clock] or [r clock] in the patch, we will get the master clock output (and everything can be in time, if you want it to be!).

timer4.) Now lets make a way of sequencing CV. We will use the [array] object, created using the “put” menu. Set the size to 8 (for the 8 steps), and right click or control click to adjust the properties, setting the y range to 1 – 0.

array_propertiesBy adjusting the sliders on the array, we will be able to change the 8 notes in our sequence.

array5.) In order to retrieve values from the array, we will use the [tabread] object. [tabread] needs an argument to tell it which table (or array) to read from, so we call it [tabread array1].

read_array6.) To send this data over OSC, we need to use the [netsend] object. This needs to be given two attributes, “-u -b” (because we are using UDP and binary), so it will look like [netsend -u -b]. We need to connect a message to it to tell it the IP address of the OSM module and the port to connect to – “connect 192.168.0.1 8000″

netsend7.) We need to format the data from our [array] object before it goes to [netsend]. We do this using the [oscformat] message. This needs an argument to give the osc path of the data. We want to send it to the CV out of channel A on the OSM, so the arguments are [oscformat osm a cv]. We then to to add “send” to this list, so we use [list prepend send]. Finally, we need to remove the word “list” from the list, so we use [list trim]. Remember, you can use the [print] object to see the outputs at different stages and what they look like.

listformat8.) Next, we want to be able to send triggers with our sequencer. We can use a combination of [toggle] and [f] to do this. [toggle] will output 1 or 0, and this can be stored in [f], with 1 being a trigger.

triggerstore9.) We create 8 of these, one for each of the 8 steps of the sequence. We can then use the clock to trigger them. If we connect [r clock] to [sel 0 1 2 3 4 5 6 7], the [sel] object will have 9 outlets (the last being for inputs outside the range to pass through), and send a bang out of each corresponding outlet: a bang from the first outlet when it receives a 0, from the second outlet when it receives a 1 and so on.

manytriggers10.) We can now connect this to the same objects to format it for osc, except the [oscformat] object is sending it as a trigger, so will be [oscformat osm a tr].

list_format 11.) We’ve now built our sequencer! Make sure you are connected to the WiFi network created by the OSM module, click the “connect 192.168.0.1 8000″ message, and you should be ready to go! Use the toggle above the metro to start the sequencer, trigger note ons by clicking the toggles, and use the array to change the CV output. You can hear the sequencer in action in the video, controlling the PolyBlep patch available here: https://hoxtonowl.com/patch-library/patch/PolyBlep/

fullpatchYou can duplicate this to create a second set of trigger / cv sequencers for the OSM, using the [oscformat] objects with the arguments [oscformat osm b tr] and [osmfromat osm b cv].

Posted in Educational | Comments Off on Pure Data Tutorial 3: Open Sound Module

Pure Data Tutorial 2: Sampler / Looper

In this tutorial, we’ll make a sampler / looper. We’ll be building on the last tutorial which you can watch again here, and assume you have Pure Data installed and know how to load the finished patch onto the OWL using hoxtonowl.com.

1.) Pure Data stores audio in an object called [table], so begin by creating this. It needs a name – which can be anything (I call mine sampler) – and a length, in samples. The sample rate of the the OWL is 48,000 hz, meaning that every second of audio is cut into 48,000 slices or samples. So, if we want to record up to 3 seconds of audio, we need the size of our table to be 144000 samples (3 * 48,000).  2a2.) To get audio into Pure Data and the OWL, we use an object called [adc~]. This has a left and right output, which correspond to the left and right inputs of the OWL. To record the audio input into the [table], we connect the [adc~] to the [tabwrite~] object. [tabwrite~] needs a name which tells it which table to write into, so here we call it [tabwrite~ sampler] – if your [table] object has a different name, you’ll need to use this.

2b
3.) We need a way to turn the recording (writing to the table) on and off, and for this we will use the push button on the OWL. To access the push button, use an object called [r Channel-Push] – the “r” is short for receive. This receives a 1 when the button is pushed, and a 0 when it’s released. To convert the  1 and 0 into something that [tabwrite~] can use, we use the [select] object, which can be written as [sel]. [sel] examines the numbers coming into it, and looks out for certain ones. It needs to be told what to look for – in this case, 1 and 0. It will output what Pure Data calls a “bang” when it sees a one or a zero. Because it has two “arguments”, 1 and 0, it has three outputs. The far left output sends a bang when the input is 1, the middle output when the input is 0, and any other inputs go out of the far right outlet.

2c4.)  We can use the bang caused by the 1 to start [tabwrite~] recording, and the bang caused by the 0 to trigger a “stop” message. Notice how the message box looks slightly different to an object box. You can create messages using the “put” menu or keyboard shortcuts. Different objects have different sets of messages that affect their behaviour: right clicking on an object and looking at the help file will show you these messages. You don’t have to remember them all, and you’ll quickly pick up what sort of messages objects require (many, like “stop” to stop recording, are quite intuitive). To read samples from the table, we use the [tabread~] object, connected to the [dac~] for audio output. Again, [tabread~] needs to be told which table to read from, so in this case we call it [tabread~ sampler].

2d5.) The input to [tabread~] tells it what point of the table to read back from, so to play back our recording we need an object which creates a repeating ramp from the beginning to the end of the table. We can use the [phasor~] object to do this, which creates a continuous ramp from 0 to 1 (notice how it’s got a tilde, which means its audio rate, so its outputting numbers 48000 times per second, giving us smooth playback). However, we don’t want it to go to just 1 – the end of the first sample – so we will multiply it by something. That something is dependent upon the length of the recording (which will of course change each time you make a new recording). We will create a [*~ 1] object for now, but notice how there is a right inlet. By inputting a number to the right inlet we change the “1” (even though that change isn’t visible on screen), and thus change what we multiply the 0 to 1 from the [phasor~] by.2da

6.)  As we just mentioned, the length of the recording will change each time we make a new recording, and we want to know what this is. The [timer] object will help us here. This has two inlets – right and left. The left inlet starts timing when it receives a bang, and a bang to the right inlet outputs the time in milliseconds, so we can connect it to the [sel] object controlling recording. In this way, starting recording starts the timer, and stopping recording stops the timer and outputs the length of the recording.

2e

7.) Now, an output from the [timer] object tells us we’ve finished recording and want to start playing back the sample, so we want this output to make a few things happen. We want it to control the frequency of the [phasor~] – that is, how long it takes to get from 0 to 1 – so the recording is played back at the correct speed. We also want to know what to multiply the [phasor~] output by, so it plays the whole length of the recording. To make the one number output do several things, we use the [t] object (short for trigger). If we write [t b f f], it will output (in right to left order, from the different outlets) two floats followed by a bang. The float – or floating point number – is the time from [timer]. Inputting this float (which happens when recording is stopped) will then cause a series of events (the output of two floats and a bang) which will make sure the full length of the recording is played back at the correct speed. To begin, we use the third outlet – an f – to multiply the [phasor~] output. The length from the timer is in milliseconds, so we multiply it by 48 (because of the 48,000 hz sample rate), to get the length (in samples) of the recording (every 1s, or 1000 ms, is 48000 samples) which we can multiply the output of the [phasor~] by, so the 0-1 range of the [phasor~] becomes 0-end of recording.

2f8.) We can use the remaining bang and float to trigger a maths operation that gives us the frequency of the [phasor~]. We do this by dividing 1000 by the length (in milliseconds) of the recording. This is when the right-to-left order of the outputs is important – the “f” is sent to the divide object’s right inlet, before the “1000” to the left inlet which triggers the calculation (for most Pure Data objects, it is an input into the right inlet which will make them do something). This is sent to the left inlet of the [phasor~] to set the frequency.2g
9.) We can test our patch if we want. We can use a toggle object to simulate what we’d get from [r Channel-Push], and if we turn audio on (using Media> Audio On, or clicking ‘computer audio’ in the main Pure Data window), we can use the toggle to record and loop our recording. Clicking on the [table] object will let you view the waveform of the recording.

You can download the patch from our patch library here: https://hoxtonowl.com/patch-library/patch/PD_Sampler_Looper_tutorial/

 

 

Posted in Educational | Comments Off on Pure Data Tutorial 2: Sampler / Looper

Rebel Technology Educational Workshops

We love teaching and delivering workshops and are experienced in doing so. The content of these workshops can be changed according to the availability, interests and abilities of those involved. Workshops can take place over an afternoon and cover part of the topics listed, or last for a couple of days and span a range of topics. The maximum number of workshop participants is 16. For workshops 2 and 3, participants will need a computer (at least one between two.)

1.) Introduction to Modular Synthesis Workshop

This workshop covers the basics of modular synthesis such as CV and trigger, and then getting hands-on making some different patches that explore demonstrate how to start making music with modular synthesisers. This workshop is suitable for anyone with an interest in modular synthesisers and requires no background knowledge in music or electronics, just a willingness to plug, play and have fun.

2.)  Learning Pure Data for the OWL Pedal or OWL Modular

This workshop teaches participants how to build a series of basic patches in the Pure Data visual programming environment and upload them to the OWL Pedal or OWL Modular. Whilst a background in Pure Data (or a similar visual coding language such as Max MSP) can be helpful, it is not essential, and the workshop can be adapted to accommodate complete beginners, serving as a great, practical introduction to Pure Data. The patches built can be varied depending upon time and the ability of the students, and all result in useful musical instruments and tools. Patches that we usually develop include (but are not limited to) a tone generator, an FM synthesiser, a delay effect and a looper. You can see our online tutorial on Pure Data on the OWL here.

3.) Learning C++ for the OWL Pedal or OWL Modular

Much like the Pure Data workshop, this workshop teaches participants how to build patches for the OWL using the C++ coding language, but relies on a little more knowledge of coding from the participants.

4.) Modular DIY Workshop

This is a workshop where participants build their own Rebel Technology modules. The assembly is relatively easy and no previous soldering experience is required. People of all ages and abilities are welcome.

The workshop leaders

Martin Klang is the developer of the OWL Pedal and the Rebel Technology Modular system. Martin has extensive experience in leading workshops at events such as hackdays, festivals and modular meet-ups, and is an experienced programmer and maker. Martin studied at the University of Gothenburg, Chalmers University of Technology and Université Paris-Sorbonne, and spent 10 years as a software engineer and systems architect before setting up his own consultancy and then founding Rebel Technology.

Dr Adam Parkinson lectures in Music Computing at Goldsmiths University and has taught at Brunel and Newcastle University. He has extensive experience teaching Pure Data to beginners. For many years he ran workshops called “Turn Your iPhone into a Sensor Instrument”, where participants used Pure Data to build a theremin-style instrument which would run on their phone. This workshop was presented across Europe, including NK Berlin, University of Applied Arts Vienna, Universidade Católica Porto, Charm of Sound Festival Helsinki, Art Academy KHiB Bergen and the Tyneside Cinema in Newcastle. Participants ranged in age from around 14 to 40 and were of all abilities.

Posted in Educational | Comments Off on Rebel Technology Educational Workshops

Rebel Technology in Teaching and Research

We believe that our work has great potential for use as educational and research tools: for people learning to code, learning musical languages such as Pure Data, or working with Open Sound Control and new interfaces. Below is an introduction to a few of our products, and how they be useful for teaching and research:

The OWL Modular and the OWL pedal

The OWL began life as a pedal but now also exists as the OWL Modular. The OWL is completely re-programmable and allows the user to write and upload their own code onto it. The platform can run C++, FAUST or Pure Data, and can be used as an educational tool for students learning these languages, or researchers developing libraries and prototypes.

The OWL Modular

The OWL Modular

It provides a great introduction to hybrid modular electronics and how to understand analogue sound and electronics. Part of the usefulness of the OWL as an education tool is that it helps give musical goals and applications for what might seem abstract programming tasks to students, for instance, “build a delay pedal” or “build a drum machine”. This delay pedal or drum machine can then be detached from the computer, and used as an instrument in its own right.

Programming the OWL

OWL patches can be developed, tested and loaded onto the OWL using only a browser and our online tools, without the need to install any software. Patches are written in C++, FAUST or Pure Data, uploaded to hoxtonowl.com, and our online compiler generates optimised machine code packaged as MIDI SysEx. Have a look at our tutorial for writing and running Pure Data patches o the OWL.

The OWL is a class-compliant USB MIDI device, and can load and run patches dynamically. Patches are sent to the OWL directly from the browser using Web MIDI. The compiler also generates Javascript, so the patch can run in the browser with audio input from a set of samples or the microphone.

The OWL toolchain is entirely open source, and can be used offline as well as online. We can provide training and workshops for both teachers and students on using and programming the OWL.

The Open Sound Module

The Open Sound Module allows you to connect a modular system to a tablet (such as an iPad), a computer, another Open Sound Module (and hence another modular synth) or even the internet, all over WiFi. It uses the OSC (Open Sound Control) Protocol. The module has two Control Voltage inputs and two outputs, along with two trigger inputs and outputs, for bi-directional wireless communication.The module is a great tool for teaching User Interface Design: interfaces developed for tablets, touchscreens or computers can be used to control modular synth systems.

The Open Sound Module

The Open Sound Module

It can also be used as a research tool allowing for novel inputs to control a modular synthesiser. Through software such as Max MSP, biosignals, brainwaves or a whole range of alternative inputs  such as light sensors or heat sensors can be sent as OSC over WIFI to control a modular synthesiser. We’ve made set-ups that allow commercial biosensors (the Myo) to play a modular set up using muscle movements. The Open Sound Module opens up a multitude of possibilities for collaborations with theatre, art, media and other disciplines.

The OWL Digital Board

The OWL is also available as a DIY circuit board, and can be used in the teaching of electrical engineering, or for researchers and designers wishing to use the technology powering the OWL in novel ways or to develop new products.

Workshops and Educational Discounts

All our products are available at an educational discount. We are happy to come and demonstrate the range of Rebel Technology products, and run workshops on programming in C++ or Pure Data for the OWL; these can be tailored to the ability of the students. Read more about our range of educational workshops here.

We believe our technology provides a great way for students to engage with the musical possibilities of programming, turning code into musical instruments, and inspiring the next generation of musical makers, as well as opening up multiple possibilities for researchers who want to to integrate new ideas and technologies with the power and possibilities of modular synthesis.

For more information, contact adam@rebeltech.org and visit http://hoxtonowl.com to see some of the patches available for the OWL.

 

 

 

Posted in Educational | Comments Off on Rebel Technology in Teaching and Research

Pure Data Tutorial 1: Tone Generator

This is the first in a series of tutorials showing you how to get Pure Data patches up and running on your OWL Pedal or OWL Modular. We won’t go into too much detail about Pure Data because we think one of the best ways to learn is by just diving in and using it, and there are plenty of tutorials on the web if you want to dig deeper – instead we’ll be focusing on getting some fun and useful patches quickly running on the OWL so you can make sounds and hopefully learn a bit of Pure Data on the way.

This first tutorial will show you how to build a simple sine wave generator, that generates 3 sine waves. The first three dials change the frequency of each sine wave independently, and the fourth dial controls overall volume. This patch is very simple but nice for generating rich tones to explore the resonance of rooms and upset neighbours and dogs.

1.) Download and install Pure Data Vanilla (not Pure Data Extended) from https://puredata.info/downloads/pure-data

2.) Once you’ve installed Pure Data (PD), open it and create a new window (File>New, or cmd+N on Mac). PD uses objects, connected by patch cables. These generate sounds, do maths – all sorts. To be able to create and connect new objects, we need to be in “edit” mode, which is the opposite of play mode – enable this is edit>Edit mode. Create a new object with Put>Object, or cmd+1 on Mac. The object to generate sine waves is called [osc~]. The ~ (known as tilde) symbol means it’s an audio rate object. We’ll learn more about the two types of object – audio and control – as we move on. In general, audio rate objects are dealing with sound, whist control objects are doing maths.2-osc3.) Because we’re adding three sine waves together, we don’t want the volume to get too loud and distort. So, the first thing to do is to reduce the volume of the output of the oscillator, by connecting the outlet to a [*~ 0.3] object. One of the great things about PD is you can treat audio like maths – multiply a stream of audio by a fraction (eg 0.3) and you reduce the volume! Note that we still need the tilde because we are dealing with audio rate objects.

3-vollarger

4.) To get the input from the first dial, we need to use a [receive] object, shortened, to [r], with the name Channel-A – so, [r Channel-A].

4-channelalarger

5.) The range of the dial is 0 to 1, but the range of human hearing (and so a useful range for the frequency of the oscillator) is 20 to 20,000 hz. So, we need to do some maths to it to get it into the right range. If we want our sine waves to be between 20 and 2020 hz (I for one can’t hear high frequencies anyway!), we multiply the input by 2000 and add 20 – as simple as that! We use the [*] object without a tilde, because this is control rate and not yet audio rate.

6-freqlarger6.) The next step is to duplicate this three times – once for each oscillator. To control the frequencies with different dials, update to the receives for the two duplications to [r Channel-B] and [r-Channel C].

7-3osc7.) The next step is to add these sine waves together. To do this, creata another [*~] object (with the tilde, because it’s audio rate), but leave the “argument” (the number inside) blank, because we can update this to make a volume control.

8-vol18.) Now, we can use the right inlet of the [*~] object at the bottom as a volume control, controlled by the fourth dial. Remember the range is 0 to 1 – this is perfect for volume, with 0 being silence and 1 being the full volume of all the sine waves added together. Finally, we connect the output of the [*~] object to the [dac~] object. Imagine this to be the speaker out – it has a left and a right channel.9-finished9.) If we want to test this, turn off edit mode, put some number boxes (a special object) where the channels are connected, turn off (Edit>edit mode), turn on audio (media>audio ON), and input values into the number boxes (remember – they need to be between 0 and 1, like the dials). You should get sound out. Now save your patch, and follow the instructions to upload to the OWL.

You can download the patch from our patch library here:

https://hoxtonowl.com/patch-library/patch/PD_Sine_Wave_Tutorial/

Posted in Educational | Comments Off on Pure Data Tutorial 1: Tone Generator

Superbooth16

We were very happy to be at Superbooth16 in Berlin and for all the amazing people we met and spoke with.

Posted in Uncategorized | Comments Off on Superbooth16

Berlin Workshop February 2016

We will be hosted at the fantastic c-base Raumstation in Berlin for a pair of module building workshop dates : February 20 and 21 (Saturday and Sunday). The hours are Saturday 2pm until 8pm and Sunday 12 noon until 8pm.

The workshops are free of charge, you only pay for what you build and take home with you. The assembly is relatively easy, no previous soldering experience is required. We will be on hand to help throughout, should you have any problems.

People of all ages and abilities are welcome, under 12s should be accompanied by an adult.

Modules available to build :

PowerKit and mini case

The PowerKit is a combined busboard and 200mA per rail PSU with +12/-12/+5v rails, suitable for small to medium sized portable cases (case and modules not included!).

Note that these are special workshop prices which are only possible thanks to the volunteer efforts of the organisers.

If you are interested in attending please let us know by filling out the contact form below.

OOOOPS! We’re having some technical difficulties! The form was not working earlier, please contact us by sending an email to info at rebeltech.org – thank you!

Posted in Uncategorized | Comments Off on Berlin Workshop February 2016

Amplitude and Pitch Triggers

Our signal parameter space is many-dimensioned and infinitely detailed, with analogue control voltages from sources such as envelopes, sequencers and low frequency oscillators. Regular triggers and gates however are blunt, inefficient and in need of an update.

We propose two rich triggers to complement simple binary triggers to make better use of those signal paths. And to open up a new realm of patch possibilities.

The idea is not new: combine triggers with accents, so that strong triggers (typically greater than 5v, here we use a 1v threshold) play louder than soft ones (closer to, but not below, the trigger threshold). We will formalise it slightly differently and combine the notion of a ‘tuned’ dynamic scale, just like we have a tuned 1v/octave pitch scale.

Amplitude Trigger
1v/24dB
If 6v means as loud as it goes, then 4v means 48dB less. 0 to 1v means no trigger. From 1v to 6v there is 120dB dynamic range.

Pitch Trigger
1v/octave
A signal level below 1v means no trigger. 1v to 6v spans 5 octaves.

Many sounds, such as percussion and plucked strings, have an intrinsic amplitude envelope. Meanwhile our modular patch habits are linked to a de-constructed approach to synthesis. Typically your envelope will control your VCA which controls the volume of what you hear. What if a VCA was incorporated into the envelope, so that you didn’t have to patch up another module? Now imagine that you can send it a special trigger, one which not only starts the envelope, but also sets the overall amplitude.

This special trigger, the rich trigger, can also be an accent to percussion, the cutoff for a filter, or the pitch of a sound generator.

The proposal here is not to replace CVs or envelopes or anything, only to add quality to simple triggers and gates.

Consider the information that the rich trigger carries. Firstly, binary: is it on or off. Second, temporal: how long is it on for. Third, cv: what is the trigger level. Lastly, while on, the level can be modulated: it can change continuously.

These new triggers are of course compatible with other signals in your modular system. You can use the output of an envelope as a rich trigger, or an LFO. Simply add an attenuator to a binary trigger to make it rich. Merge a simple trigger and a CV signal into a rich trigger by gating with a 1v offset. Split the rich trigger into trigger plus CV with a comparator. And the same simple rule of modular applies: patch anything into anything!

Posted in Uncategorized | Comments Off on Amplitude and Pitch Triggers

Workshops in Tilburg and Barcelona

The workshops are free of charge, you only pay for what you build and take home with you. The assembly is relatively easy, no previous soldering experience is required. We will be on hand to help throughout, should you have any problems.

Modules available to build :

Note that these are special workshop prices which are only possible thanks to the volunteer efforts of the organisers.

If you are interested in attending please let us know by filling out the contact form below. Our previous workshops have all been very successful: everyone goes home with a brand new, fully functional, self-made module – some with two!

PowerKit and mini caseBoth of the workshops are part of bigger events. In Holland we will be at the massive Incubate festival, and in Spain we’re joining Barcelona Modular Day 2. There will be lots of other great workshops, exhibitions and performances, so check the program and come along if you can!

The PowerKit is a combined busboard and 200mA per rail PSU with +12/-12/+5v rails, suitable for small to medium sized portable cases.

.

 

Posted in Uncategorized | Comments Off on Workshops in Tilburg and Barcelona

OWL Modular Demo

We’ve made a little demo video in the studio, showing off a few of the OWL factory patches. The video also covers how to change between the 40 patches that come pre-loaded, and how to load patches from the website.

Patches used in this video:

Posted in Uncategorized | Comments Off on OWL Modular Demo