Downtown

downtown

become an architect of sound.

Image

view downtown over the skyline. build skyscrapers or tear them down to change the sounds coming from the city. record and mix in your sounds into the city and even build your own towers.

all cities are alike and all cities are different. like cities, this script welcomes change. the towers are built from supercollider tweets - you can easily find more and then add it as a new tower in the city.

Requirements

  • norns

Documentation

  • K2 changes sample
  • K3 toggles recording
  • E2 changes modulator
  • E3 modulates

this script is meant as “playground” to add little supercollider things and interact with them through softcut loops. the three softcut loops record in stereo and their length is dependent on the norns internal tempo. they are set to 16 beats, but this can be changed within the script (restart to apply changes).

the supercollider things are represented as towers, accessible through E2 and E3 (although you could certainly tie them to grid / controllers). the towers are modulations for supercollider scripts running in the norns engine.

new towers

the engine has a bunch of different free-running supercollider scripts. its easy to add your own. if you want to add one, you can follow these five steps to make your own.

  1. in Engine_Downtown.sc, add a var <synthX; at the top after Engine_Downtown : CroneEngine {, where X is whatever you want.
  2. in Engine_Downtown.sc, define the synthX, using something similar to this:
synthX = {
    arg amp=0.0, amplag=0.02, hz=440;
    var amp_, snd;
    amp_ = Lag.ar(K2A.ar(amp), amplag);

    // define your beautiful sound here
    snd = SinOsc(hz); // or anything!

    snd
}.play(target: context.xg);
  1. in Engine_Downtown.sc, create a command definition that can be used from within lua. a simple one that each could have is amplitude to change the levels or change frequencies.
this.addCommand("ampX", "f", { arg msg;
    synthX.set(\amp, msg[1]);
});
this.addCommand("hzX", "f", { arg msg;
    synthX.set(\hz, msg[1]);
});
  1. in Engine_Downtown.sc, add synthX.free; at the bottom of the code.
  2. in downtown.lua add a new modulator that references the command definitions:
modulators = {  
  {name="my sound",engine="ampX",min=0,max=0.5}, // add a line for each thing to modulate
  {name="my sound freq",engine="hzX",min=0,max=0.5}, 
  ...
  1. that’s it! there will now be a new tower in the city with each parameter for your sound.

Download

v0.0.1 - https://github.com/schollz/downtown/archive/v0.0.1.zip

67 Likes

such an amazing idea. love this “bite sized” way to learn sc. totally whimsical expression too.

5 Likes

There are a lot of rich people in Birmingham
A lot of ghosts in a lot of houses
Look over there!..A dry ice factory
A good place to get some thinking done

4 Likes

holy fracken wow!

so…will Godzilla randomly destroy the city?
:stuck_out_tongue:

5 Likes

can we add plants and trees? :slight_smile:

2 Likes

v0.1.0

just updated because i was reading about supercollider last night and learned how to optimize a little bit (.ar -> .kr). made enough room to add another tower- storm.

haha as of yet, no. but currently there is fiahod for that!

also…not yet…but maybe soon.

thanks! so much was inspired by your creations. like dronecaster (but towers instead of drones and they are always “casting”!) and fiahod (a city instead of plants :slight_smile: ).

also jic there’s wondering…the whimsical creations were made using pixilart.com with a canvas the size i needed (128x19) and then exported. the export has a base64 representation of the png, which i pasted into a Go script to convert pixelart into to lua.

love this :slight_smile:

12 Likes

Yeah Rampage!

17 Likes

this is extremely cool, amazing job!! can’t wait to dig more into it

1 Like

one person’s Rampage is another person’s GORILLA.BAS

(highly here for interesting visual representations and interfaces)

5 Likes

Ooooh I totally forgot that game!

1 Like

v0.2.0 - behold the power of gojira

  • gojira has the power to destroy (if fear is true) or lift (if love is true) anything in the environment using E1
  • you can load up to 8 stereo field recordings / tapes that will loop forever. these recordings automatically load as a “natural” sound and will show up as a tree/bush instead of a building. use E2 and E3 to modulate their volume.

demo (with trees and fire):

29 Likes

this is just too cool :exploding_head:

1 Like

so i built a forest for Godzilla to destroy…:stuck_out_tongue:
however…
when i went to go change the sounds of the trees…it wouldn’t release the initial sample i loaded…that first sample would just persist.

jiust a sec…
…
…
…
hmmm…ok…now it’s loading a couple of other samples but won’t load anything else.

do they have to be stereo samples?

1 Like

i think they can be mono, but i may have only tested on stereo.

however, currently you can only load .wav files…where you trying to load a .aif/.mp3 or something? sorry i wish i had put in some messaging to help know whats goinng on!

1 Like

This looks great. Also brings back fond memories of Rampage here too ha. (zx spectrum version in my case)

Looking forward to finding random supercollider tweets and trying that when I’m more awake. I have no idea about supercollider and zoned out half way thru your instructions just now, :slight_smile:

1 Like