Lovely app : a sonic pi challenge code?

HI everybody,

i discover this little web app https://arp.jake.fun/

it’s quite interesting and can give some ideas to be developped with sonic pi.

Hope you like it !

2 Likes

Good One :slight_smile:
Reminds me of this
http://ctford.github.io/klangmeister/

Neat, reminds of https://codepen.io/jakealbaugh/full/qNrZyw

It would be great if there could a set of little apps with Sonic Pi as the backend, both for learners and creators. For example, taking this as an inspiration: https://codepen.io/jakealbaugh/full/qNrZyw

I don’t know if Ruby lends itself to such ?
I know I have not found a way to make it
respond to the keyboard. Ended up using
Python … I.E.

ptch=["Grand Piano","Bright Grand","Electric Grand","Honky Tonk",
      "Rhodes","Chorus Piano","Harpsichord","Clavichord",
      "Celesta","Glockenspiel","Music Box","Vibraphone",
      "Marimba","Xylophone","Tubular Bells","Dulcimer",
      "Hammond Organ","Percussion Organ","Rock Organ",
      "Church Organ","Reed Organ","Accordian","Harmonica",
      "Tango Accordian","Acoustic Nylon Guitar",
      "Acoustic Steel Guitar","Electric Jazz Guitar",
      "Electric Clean Guitar","Electric Mute Guitar",
      "Overdrive Guitar","Distorted Guitar","Guitar Harmonic",
      "Acoustic Bass","Electric Bass Finger","Electric Bass Pick",
      "Fretless Bass","Slap Bass One","Slap Bass Two",
      "Synth Bass One","Synth Bass Two","Violin","Viola","Cello",
      "Contrabass","Tremolo Strings","Pizzicato Strings",
      "Orchestra Harp","Timpani","String Ensemble One",
      "String Ensemble Two","Synth Strings One","Synth Strings Two",
      "Choir Ahhs","Voice Oohs","Synth Voice","Orchestra Hit",
      "Trumpet","Trombone","Tuba","Mute Trumpet","French Horn",
      "Brass Section","Synth Brass One","Synth Brass Two",
      "Soprano Sax","Alto Sax","Tenor Sax","Baritone Sax","Oboe",
      "English Horn","Bassoon","Clarinet","Piccolo","Flute",
      "Recorder","Pan Flute","Bottle Blow","Shakuhachi","Whistle",
      "Ocarina","Square Wave","Sawtooth","Calliope","Chiff Lead",
      "Charang","Solo Synth VX","Brite Saw","Brass and Lead",
      "Fantasia Pad","Warm Pad","Poly Synth Pad","Space Vox Pad",
      "Bowed Glass Pad","Metal Pad","Halo Pad","Sweep Pad",
      "Ice Rain","Sound Track","Crystal","Atmosphere","Brightness",
      "Goblin","Echo Drops","Star Theme","Sitar","Banjo","Shamisen",
      "Koto","Kalimba","Bagpipe","Fiddle","Shanai",
      "Tinkle Bell","Agogo","Steel Drums","Wood Block","Taiko Drum",
      "Melodic Tom","Synth Drum","Rev Cymbal",
      "Guitar Fret Noise","Breath Noise","Sea Shore","Bird Tweet"] 

import pygame; pygame.init()
pygame.display.set_mode([1,1])
fo=open("/dev/snd/midiC1D0","wb",0)
note=60; patch=0
print("Any arrow key to start")
while True:
  for event in pygame.event.get():
    if event.type == pygame.KEYDOWN:
      if event.key == pygame.K_UP:
        note=note+7
      if event.key == pygame.K_DOWN:
        note=note-7
      if event.key== pygame.K_RIGHT:
        patch=patch+1
      if event.key==pygame.K_LEFT:
        patch=patch-1
      for off in range(note-2,note+2): 
        mmsg=[144,off,0];fo.write(bytes(mmsg))    
      mmsg=[192,patch];fo.write(bytes(mmsg))  
      mmsg=[144,note,127];fo.write(bytes(mmsg))   
      print()
      print()
      print("  Up - Down  arrows for note  =", note)
      print("Left - Right arrows for patch =", patch, ptch[patch])
      print("                    Frequency ~", round(2**((note-69)/12)*440),"Hz")        

Good example ! https://codepen.io/jakealbaugh/full/qNrZyw

@robin.newman has made some apps using touchOSC and Sonic Pi. @Martin developped a app using open-stage-control and sonic pi.

i try myself to develop a little app but time and talent are missing :slight_smile: but one day i hope.

we have to use a “compagnon”
something into a browser (Brtoher ! ): https://jsfiddle.net/KeithMcMillenInstruments/upae79bu
or a software like open-stage-control : you can add widget reacting to keyboard.

this software can be used to detect keyboard computer