Dinky OSC development

My company, Digital Maker CIC, has been successful securing project funding from Creative Scotland to explore making a prototype interface we’d love to use with Sonic Pi. Over the next few months we’ll be looking for people to help us by testing kits, giving feedback, suggestions etc. We’ve also factored in to our funding, 2 paid “commissions”, using the developed prototypes to make some music with …
We’re still scratching around looking for kit / boards / chips to use in the initial developments, but, if you’re interested in helping (we send you kit you can keep if you send us feedback!) join us at : Dinky OSC - Digital Maker CIC

we’ve also been tweeting out some #micropython #oop experiments https://twitter.com/digitalMakerCIC/status/1357733116903890944 if you want to see some more, check out the DMcic twitter feed.
Send me a message if you are interested in contributing…
thanks, Phil.

5 Likes

This is really exciting and I look forward to hearing more about your progress :slight_smile:

Hi (everyone!) - Well, after battling with some annoying Windows / OSC / Firewall problems, We’ve got the DinkyOSC prototype working well (we think!) & have arranged to get some PCBs made so we’ll be close to sending out some kits. It’s taken a lot longer than we’d hoped to get to this point, but we hope people are still interested in experimenting with what we’re making & helping us shape it into something people would really want to have in the ir Sonic Pi set up!


We’ve been using Bela Trill (Ring / Bar) for inputs
A ESP32-WROOM-32U WiFi chip
A 240x240 px LCD screen
all connected to a Raspberry Pi Pico
We’ve saved a load of “pre-set” Sliders, Pots, Boolean switches (which get updated & saved “real time” so when you fire up sonci pi / dinky OSC , all the previous settings are loaded back in for the song you were working on).
We’re nearly ready to get some peeps to help test / play / feedback … We’ll keep you posted…
thanks for reading!
I (Phil) will be aiming to put a wee video together this week to showcase where we are. (Excuse my broken finger in shot, I broke it biking a few weeks ago).

3 Likes

Wow, great work! Well done :slight_smile: I look forward to the showcase video…

It’s taken a lot longer than we’d expected, but, we’ve had quite a few steep learning curves. Martin Evans has done an amazing job on making PCBs in Kicad … We’re ready to send out a couple of units to testers, the fantastic Robin Newman has volunteered to have a play, so we’re looking forward to seeing what he thinks of it…
We’re looking for 2 more testers, if anyone wants to give help (you’ll get a free DInkyOSC prototype to keep (Raspberry Pi Pico, Wifi Chip, OLEd) all we ask in return is for feedback…

@philAwesomeTech what an amazing offer!

Would it be at all possible to explain a little more about what DinkyOSC currently does?

well, it’s a wi-fi enabled OSC “controller” with an interface made in circuitPython (on a raspberry Pi Pico).
I (Phil) created a UI based on things I thought would be useful when needing to control parameters in sonic Pi… so, there are 5 types of “IO screen”

  • CHN (Channels)
  • SLI (sliders)
  • POT (potentiometers / dials)
  • BOO (Boolean switches)
  • DRM (boolean switches, but in groups of 8)

the CHN IO screens have a mixture of IO types (sliders, pots, boos)… so I thought it was a good way to “group” inputs associated with a channel you’d like to control…

I’ve written a “utility script” that listens for the DinkyOSC changes, and can convert the values (%'s) into “Sonic Pi ready” params (0.01 to 0.99 for example (where an fx param might not like 0 or 1)…

I’ve also put together some “shortcuts” so you can pull out a ring array from a bunch of DRM booleans (so you can cycle through the array and use it as a drum pattern for example).

I’ve also enabled the user to pass in a custom range if they don’t want the pre-sets I’ve implemented). There’s also an “auto save” built in, that writes the settings to the Pico, so when you start it up again, all the settings will be saved. There’s a mode where you can over write or blank the settings if you wanted to start from scratch again…

The interface is a neat “touch sensitive” controller that has 5 buttons and a “dial”. you can cycle to specific IO types / Object with the buttons, then control the input with the “Dial”… it (obviously) only works on one IO type at a time, but, it’s pretty quick to cycle through to objects…

I’ve recorded some clips (as I’d promised a long time ago) and I’ve just got to edit it together, so I’ll post that here when I get the chance.

Hopefully it’s useful! and easy to use & compliments using Sonic Pi as a musical performance tool, as well as pushing concepts on coding creatively (how can you use a boolean switch in Sonic Pi, for example!)

hope that helps!
Phil.

3 Likes

Hi everyone,
I’ve made a few videos now!
Uploaded them to the digital Maker CIC youTube channel (subscriptions welcome :wink: )
here’s the first “how to” (using the basics on a CHN screen (AMP / PAN)…
Big thanks to @robin.newman & @soxsa for the early testing & feedback… a lot of fantastic thought & feedback <3

We’ve had the fantastic @soxsa send us a composition & video (mixing DinkyOSC / Hand Drawn Notes / Sonic Pi screen capture) as his initial 1st phase DinyOSC prototype testing… I love it!
I’ve noticed Guy uses his own methods for pulling in the OSC from the Dinky, so it’s great to know how flexible it is… Thanks Guy!

2 Likes

Thanks @philAwesomeTech yes the whole OSC thing is so flexible and easy to code with SPi, I can imagine many ways to use DinkyOSC in live work. In this piece I have 12 SPi loops each one controlled by one Pot - so I can control them all from one page. With the multiple pages of Pots, I could do even more interesting things, e.g. have the controls for FX on another page.

I’ve done similar things with midi controllers, but I find I always need just one more Pot or Button. And midi controllers with lots of pots tend to be pretty expensive. I don’t think I’d ever run out of controls with the Dinky…well, you never know… :slight_smile:

Handwritten notes, yes I do that. Although one of the advantages of using SPi is that you can write comments in the code so on each piece I have a header with the mappings on. Belt and braces, you know.

2 Likes

Here is the control code I used, run in it’s own SPi buffer

# DinkyOSC

live_loop :dinky_cc do
  #knobs on control_change
  #Set volume for each track e.g. "cc_3 = 0.5"
  #Tracks go 1..12, volumes go 0..1
  use_real_time
  page,channel,value=sync "/osc:*/trigger/changeVal"
  track  = channel-1
  #Dinky goes from 2..96. Map to 0...1
  volume = (value-2.0)/94.0
  s="cc_"+track.to_s
  set s, volume
end

define :dinky_vol do |track|  
  #Call this function from the loop to return a volume modifier
  volume=get["cc_"+track.to_s]
  volume=0.0 if volume==nil or volume < 0.0
  volume=1.0 if volume > 1.0
  print [track,volume]
  volume
end
1 Like

I’m loving learning new ways of coping with “oddities” , it’s so helpful (much appreciated!)
I think the first time I realised how to set a default parameter to a function / method, a little light bulb went on inside my head…
so, this is superb, thanks!
phil.

1 Like

I was thinking of trying to make a “wrapper” for a full channel… where you can (in the background), map a load of params to the IO objects on a screen & the comments in the “wrapper” would help you remember what the “channel” was dealing with…
Thanks again for all the comments & input, incredibly helpful. The same goes for @robin.newman amazing input ( I love using Sonic Pi, but I am but a beginner when it comes to a lot of the detail / code / methodologies ) so I am very grateful for your time & patience.
Phil.

1 Like

Thanks @philAwesomeTech . There are so many different approaches to working with SPi, which is one of the attractions. I like to see the wrapper idea.

After trying various styles, I’ve tended to shy away from building lots of utility layer functions in favour of more raw code. Both approaches have pros and cons, it’s just what I prefer at the minute.

The problem with ‘depth’ (i.e. layers) is maintenance - you can invest a lot of energy in sculpting and elegant system, and enjoy using high-level functionality it gives. But sometimes you have to revisit it to handle changes in SPi versions, which means more time coding and less time making music.

1 Like

Yes I agree with this, I prefer to use the direct OSC calls to Dinky-OSC rather than to use different wrappers, but I think it may be a matter of personal preference.

2 Likes

cool, cheers for that.
I think my approach to writing the “wrappers” (or conversion “utilities”) had beginners in mind, (being one myself reasonably recently!)… so the “handling” of converting the OSC message into an easily used “sonic pi friendly” value was one of my main goals. when I was using FX, i’d often put in the wrong range (like going past 0.999 if something should be greater than 0 & less than 1)…
I know you guys know what you’re doing in sonic pi, and it’s great to know that the “simple OSC message” can be used (as expected) by anyone that knows their stuff… I did have a complete novice lined up to test, but, I’ve not heard anything back in a few weeks… (too busy? too difficult? too much hassle?)… I’ll hopefully find out.

Ultimately, if it’s helpful / useful for a live performance with sonic pi… then, cool!
It’s been fun developing it, I’ve learned so much (programming, design etc) and I really appreciated the input & guidance you have afforded me / us ! (Phil / Digital Maker)

1 Like

@robin.newman and @samaaron would have a better handle on this, but I think that many people are attracted to Sonic Pi precisely because it gets them into coding. If so then the appetite for gory details could be quite big - even in a beginner.