GithubHelp home page GithubHelp logo

schollz / norns.online Goto Github PK

View Code? Open in Web Editor NEW
38.0 4.0 3.0 747 KB

online norns with norns.online

Home Page: https://norns.online

License: MIT License

HTML 20.26% Go 42.31% Lua 37.43%
norns monome crowdsourcing music

norns.online's Introduction

norns.online

111

https://vimeo.com/484176216

connect. norns.online is a norns script, a script library, and a website.

share tapes. use the norns.online script to upload or download tapes to norns.online/share.

share script saves. individual scripts also can upload/download saves to norns.online/share by going to the SHARE parameter from within a particular script (devs: feel free to ask me for help to add it your script).

listen and visualize. run the norns.online script to beam your audio+visual data to norns.online/<yourname>.

remote control. the website norns.online/<yourname> has the same inputs as your norns to provide remote access.

collaborate. use the norns.online script to connect to other norns via "rooms." anyone in a "room" shares live audio. the latency is ~4 seconds, so you can imagine that you all are playing together while being socially distanced by a distance of a quarter-mile.

note: the script requires ffmpeg and mpv, which are automatically installed if you use this program (~300 MB).

future directions:

  • fix all the 🐛🐛🐛
  • audio sharing sync (very hard)
  • audio sharing as input to softcut/engine

Requirements

  • norns
  • internet connection

Documentation

  • move with any encoder, select with K3
  • update with K1+K2

note: if this is the first time running, wait for the mpv and ffmpeg programs to be installed (~300 MB).

beam your norns

  • press go online.
  • open browser to norns.online/<yourname>.
  • use norns normally, your norns will stay online in the background.

norns↔norns audio sharing

  • go to gloal parameters and make sure both "send audio" and "allow rooms" are set to "enabled".
  • change the "room" to the room you want to share audio. make sure your norns partner uses the same room.
  • go to main screen and press go online. you should now be sharing audio with any other norns in that room.
  • adjust "room vol" to change the level of incoming audio.

uses

  • make an internet radio from your norns
  • collaborate between two norns
  • twitch plays norns
  • make demos (screen capture norns.online)
  • download screenshots (right-click image at norns.online to download)
  • tech support other people's norns
  • sharing tapes / script saves
  • !?!?!?

faq

how does the norns.online streaming work? norns runs a service that sends screenshot updates to norns.online/<yourname>. the website at norns.online/<yourname> sends inputs back to norns. norns listens to to inputs and runs the acceptable ones (adjustable with parameters). if enabled, norns will also stream packets of audio and send those to the website. the website will buffer them and play them so anyone with your address can hear your norns.
how does audio streaming work? a pre-compiled jack_capture periodically captures the norns output into 2-second flac files into a /dev/shm temp directory. each new flac packet is immediately sent out via websockets and then deleted. because of buffering, expect a lag of at least 4 seconds. when in a room, audio from other norns is piped into your norns via mpv. the incoming audio from other norns is added at the very end of the signal chain so (currently) it cannot be used as input to norns engines.
is norns.online secure?

for norns.online,if you are online, you have security through obscurity (weak security). that means that anyone with the url norns.online/<yourname> can access your norns so you can make <yourname> complicated to be more secure. code injection is not possible, as i took precautions to make sure the inputs are sanitized on the norns so that only enc() and key() and _menu.setmode() functions are available. but, even with these functions someone could reset your norns / make some havoc. if this concerns you, don't share <yourname> with anyone or avoid using this script entirely.

how does sharing work?

everything you pload to norns.online/share is made public but everything is also authenticated. authentication means that the data you download from someone named "bob" is truly data from the user who registered as "bob" and not someone posing as "bob". the server does not ensure that "bob" is a good or bad person, but only that the "bob" the server knows is the "bob" that registered with the server. authentication is provided through using rsa key-pairs. the server verifies your data comes from who you say you are by checking the signature on the hash of anything you upload. in theory, other people can obtain your key-pair directly from you to independently verify your data is actually coming from you (so the server need not be trusted), but this is not implemented yet.

how much bandwidth does this use? if audio is enabled, a fair amount. the norns sends out screenshots periodically, but at the highest fps this is only ~18 kB/s. however, if audio is enabled - the norns sends flac packets periodically (~170 kB/s = ~616 MB/hr). if you are audio-sharing a room you will be receiving about that much for each norns in the room. i tried reducing bandwidth by using lossy audio (ogg) however the gapless audio playback only worked without pops when using flac or wav.
how much cpu does this use? not too much. on a raspberry pi 3b+ this uses about ~4% total CPU for capturing and sending audio data. screenshots also take cpu and higher fps takes more. the exact fps depends on the max fps (set in params) and how fast the screen changes (only updated screens are sent). at max it might take up to 30% of the cpu (15 fps!), but usually its 1-15%.
how much disk space does this use? installation requires `ffmpeg` and `mpv` which take up about 300MB. other than that, it only takes up space when you download shared script saves and tapes.

my other norns scripts

  • barcode: replays a buffer six times, at different levels & pans & rates & positions, modulated by lfos on every parameter.
  • blndr: a quantized delay with time morphing
  • clcks: a tempo-locked repeater
  • oooooo: digital tape loops
  • piwip: play instruments while instruments play.
  • glitchlets: add glitching to everything.
  • abacus: sampler sequencer.

license

mit

norns.online's People

Contributors

schollz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

norns.online's Issues

keep softcut saves as flac?

  • after downloading a softcut flac save, it might be worth keeping it in flac format until it is used... would have to add a "softcut" toggle for this

Use a tmpfs mountpoint for volatile data

norns.online logs and produces screenshots in /tmp.

On norns OS images, /tmp has no dedicated tmpfs mountpoint and depends of the root partition (on flash / SD card).

we@norns:~/dust/code$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       7.2G  2.7G  4.2G  39% /
devtmpfs        449M     0  449M   0% /dev
tmpfs           453M   84M  370M  19% /dev/shm
tmpfs           453M   12M  442M   3% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           453M     0  453M   0% /sys/fs/cgroup
/dev/mmcblk0p1   43M   31M   13M  72% /boot
tmpfs            91M     0   91M   0% /run/user/1000

Repetitive writes could decrease the life expectancy of the storage medium.

A better solution would be to produce volatile data on a memory mountpoint.
3 solutions:

  • use /dev/shm: kinda dirty but as norns doesn't do any IPC (inter-process communication) it's not too critical
  • create a dedicated tmpfs mountpoint for norns.online
  • ask norns maintainers about making a deidcated tmpfs mountpoint for /tmp

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.