Coder Social home page Coder Social logo

bubobubobubobubo / topos Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 9.0 189.36 MB

Web Based Live Coding Environment. Inspired by the Monome Teletype.

Home Page: https://topos.live

License: GNU General Public License v3.0

HTML 7.72% JavaScript 2.38% TypeScript 73.79% CSS 15.95% Rust 0.07% Dockerfile 0.09%
algorithmic-composition computer controller livecoding midi monome music sequencer synthesis teletype toplap webaudio

topos's Introduction

Hi 👋

My name is Raphaël Maurice Forment, I am a musician and live-coder from France (Lyon / Paris). I build systems for musical improvisation. I am not a natural born programmer but I am willing to deep-dive when I need to and I love programming as a craft practice. I am currently doing my PhD at the Jean Monnet University of Saint-Etienne working on live coding. I play concerts, I give workshops, I try to articulate code with artistic practice as much as possible.

  • 🔭 I’m currently working on Sardine and Topos, two live coding environments.
  • 🌱 Learning more about Python, packaging and building robust software, etc.
  • 📫 How to reach me: GitHub Issues or e-mail (easy to find)

Some projects (or future projects)

  • Sardine: live-coding with Python 3.11.
    • Sardine Web: A TypeScipt based editor for Sardine!
    • Sardine VSCode: the companion plugin for VSCode.
    • Flok: Sardine integration for collaborative networked jamming!
  • Topos: prototype for a Monome Teletype inspired live coding environment.
  • Monocosm: abandoned prototype for a 2D TS-based live coding environment.
  • Sliderwolf: a fun MIDI Controller.
  • BuboQuark: my SuperCollider live coding setup.
  • Sardine Sounds: a sound library for Sardine.
  • Sonic Pipe: a weird/abandoned TUI interface to Sonic Pi.

topos's People

Contributors

amiika avatar bubobubobubobubo avatar edelveart avatar epickiwi avatar fr0stbyter avatar julienh2000 avatar martindelille avatar pipazoul avatar

Stargazers

 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  avatar

topos's Issues

Support for external Midi clock

Test listening to external midi clock and estimating the bpm. At least two options for simple poc:

  • Evaluate code directly with received ppqn, but default 24 might not work?
  • Start on TransportProcessor on first received midi clock and estimate bpm based on it

Audio and Data Visualization

Adding sound visualisations :

  • Oscilloscope
  • Spectrogram
  • Oscilloscope Music kind of thing (X-Y axis)

Adding data visualization :

  • Blink on script evaluation
  • Blink on errors
  • Bar / timeline visualization

High-order functions: patterning functions

Topos recently started to acquire patterning capabilities but patterns are mostly constituted of values: [1,2,3].beat(). This is nice, but it should not stop there.

It would be nice to be able to pattern function application: [1,2,3].apply([reverse(2), palindrome].bar()).beat(). This is already possible but there is currently two issues:

  • it is ugly. The syntax could be better to do so!
  • the code is not optimised to do so. You have to declare the reverse two times, once as a general high-order functions and a second time for the data structure inheriting that capability.

The work to make this better is rather easy. Strudel is using a register() function that is mapping high-order functions to different data structures. Topos should probably do the same to be a cool algorithmic pattern language.

javascript error / no sound

Hello,

This looks really cool. I can't get it to produce any sound. I hit control-G and then pasted in some code:

mod(24) && euclid($('a'), 5, 8) && d({s:'bd'});
mod(24) && euclid($('b'), 2, 8) && d({s:'cp'});
mod(24) && euclid($('c'), 7, 8) && d({s:'hh'});

I put my cursor on the first line and hit control-enter. Maybe the screen flashes a bit, it's hard to say, but I don't hear any sound.

I do see errors in the javascript console happening quite frequently, in multiple browsers:

VM63252:7 ReferenceError: d is not defined
    at UserAPI.eval (eval at <anonymous> (index-28a25d7a.js:56:6820), <anonymous>:3:43)
    at index-28a25d7a.js:56:6883
    at new Promise (<anonymous>)
    at tryCatchWrapper (index-28a25d7a.js:56:6796)
    at tryEvaluate (index-28a25d7a.js:56:7005)
    at index-28a25d7a.js:56:7849

Thanks

24db/Oct filter

Doubling the base filter:

  • using a new keyword, .order
  • Takes two possible values: 12 or 24. The default is 12db/Oct

Time visualization

It would be nice to offer more visual feedback about the code being played. It could be as simple as displaying an animation everytime an event hits or showing a bar representing time somewhere on the screen. This is both easy and fun to do so better get to work.

Code completion

Would be great to have code completion :

  • to learn the synthax directy from the editor
  • to go quicker while avoiding short function name

Vim mode overhaul

There is currently two modes of operation for the keyboard: vim or normal. They work rather well but they don't have the same set of features. Application shortcuts are only available for the normal mode because I suppose that Vim is overriding these keybindings or intercepting them. It should just be a matter of re-declaring them for the mode.

Similarly, the menu to pick between Vim and normal is kind of broken even though it works. It is likely that the bug arises from the fact that the user selection is not properly displayed when the settings menu is opened.

better filters ?

resonance doesn't seems to have a real effect on filters, or doesn't sounds really nice,
What are the different filter slopes/what order are they?

Sample autocomplete misbehaviour

Auto-complete for samples in the Sound function doesn't work with the snd alias, and doesn't support typing (so it's a pop-up list instead of a real completing system). Sound( will pop up the list, but Sound("f will break the pop up instead of showing every samples beginning with "f".

Envelopes on filters

Adding automation on filter cutoff:

  • linear / exponential / lfo
  • From cutoff value to another value over a given duration: .lpf(5000).lpt(2000, 0.25)
  • duration is optional (can be duration of base event)
  • lfo using the same lpt value but as an amplitude from central point
  • backward compatibility: only assign envelope if asked explicitely

Naming practices for the Topos API

Currently Topos API is mostly using snake casing while some (most?) prefer camel case when coding JavaScript. Which one to use? Is refactoring needed to harmonize?

aliases ? what about some fancy short names

for the filters
lpf hpf bpf
with
lpq hpq bpq

i really believe it could be more logical to have a common resonance or res parameter fir the three types of filter, and if you want some precise controls you can use lpq hpq bpq

delay
delayfb delayt delay

velocity
vel

euclid
eu

control_change()
cc()

program_change()
pc()

sysex()
sy()

Finish implementation of Array methods

I once started to write new array methods ([1,2,3,4].beat()) just to see if they were a good idea and they were a good idea. Since that time, I never truly took enough time to make a decent implementation with interesting methods that are easy to use and understand. A PR could handle that.

Documentation of Superdough synthesis features

The PRs on Superdough have been integrated, adding:

  • Wavetable synthesis for samples starting with wt_
    • Also loopBegin and loopEnd with begin and end.
  • Filter enveloppes for all the base filters
  • Filter order selection
  • Vibrato using vib and vibmod.

These should be documented somewhere!

Normalize audio samples gain

It would be nice to normalize all the default sounds to a predictible level so that gain() could be used without leading into a jumpscare. It looks like Strudel is normalizing samples to a rather low level. Gain scaling and balance with WebAudio is rather hard to achieve for some reason.

Pre and Post EQ

Optional pre/post EQ for each event:

  • simple three band EQ (low, mid, high)
  • .prelow, .premid, prehigh
  • .postlow, ,.postmid, .posthigh
  • Entirely optional for backwards compatibility.
  • only one band needs to be specified for the EQ to be applied. Assume default values with no boost or cut for unmentioned values.

Sample name completion

Add a code completion that auto-fills the name of a sample. Takes sample names from the list of samples currently loaded.

Fleshing out MIDI and desktop-based MIDI/OSC

Strudel has proven that it is possible to use this type of application on the desktop with syntehsis and good I/O. Having MIDI and OSC on the desktop-app using Tauri would be great but difficult to do + don't have the time to take a look at it for the moment.

truefor

Adding a new function called truefor

  • truefor(startPos: number, period: number): returns true continuously for the given period over the whole period (in beats).

Fix Memory Leak

Something is going with Topos and it's very hard to diagnose. It looks like the application is suffering from a subtle memory leak that is not getting reported on the performance monitor. Many fixes have been tried already with no success.

  • How to diagnose a memory leak?
  • What can fix the issue we are currently facing?

Part of the problem might arise from the current clock implementation but the replacement is not ready to be merged and suffers from tempo / time correction issues.

Adding syntactic variants for MIDI

It would be nice to support:

// note, velocity, channel
midi(50, 80, 1).out()

and the current syntax:

midi({note:50, velocity:80, channel:1}).out()

Detect if object as first argument, etc... The goal is to make that function as fast to type as possible. The user can learn three arguments for that function.

Audio samples error: not decoding / not loading

Even though the import JSON of audio sample folders is correct, some of them are not loading. It might have something to do with audio encoding (personal theory). Is there something we can do to fix this situation?

  • @felixroos mentioned that there is no hard limit to the number of samples you can load.
  • errors are popping up in the console when loading some samples:
index.mjs:237 Uncaught (in promise) DOMException: Failed to execute 'decodeAudioData' on 'BaseAudioContext': Unable to decode audio data
await (async)
out @ SoundEvent.ts:254
eval @ VM2271:3
(anonymous) @ Evaluator.ts:22
tryCatchWrapper @ Evaluator.ts:18
tryEvaluate @ Evaluator.ts:59
(anonymous) @ TransportNode.js:46
setTimeout (async)
handleMessage @ TransportNode.js:42
``` 

Accordion/Panel for examples

It would be nice to be able to give multiple examples for everything. A panel/accordion in the docs could be used for that.

Isolated audio event after pause/stop

When pausing/stopping, you sometimes hear a random isolated event playing after a while. It appeared in recent commits (around the time the TransportNode was tweaked for the last time). What is happening? Can we cancel events when pause/stop is fired?

More musical examples, more examples

It's hard to document something that is still under heavy dev. However, musical examples are super useful to teach people how to work with the software:

  • Examples section with didactic pieces: sampling, MIDI, organisation, trivia, etc...
  • Teaching the user how to move in the interface to compose complex musical pieces
  • More examples for each section (accordion?) showing different use cases.

Editor theme is confusing

The current theme used by the editor is confusing. The cursor tends to disappear when writing code in nested parentheses and other similar phenomenons. It would be nice to fallback to some default theme and work from there to restore current colorscheme.

Fixing doc playback mechanism

It should be fixed by having a new buffer called 'example' that is running on demand when play is pressed in the docs and emptied when pause is pressed. This buffer becomes inactive if the doc is not open.

Polyphonic messages

Instead of:

beat(0.5)::sound('sawtooth').freq(400/2).ad(0, .25).out()
beat(0.5)::sound('sawtooth').freq(398/2).ad(0, .25).out()

Why not just:

beat(0.5)::sound('sawtooth').freq(400/2, 398/2).ad(0, .25).out()

Collaborative Topos

Collaboration between multiple players over the same server would be nice. Given the existence of multiple files, it is rather tricky to imagine how it would work but I suppose that the data structure containing the files could be monitored by the sync mechanism. There is quite a lot of resources concerning collaboration with CodeMirror editors but the hard part is the actual implementation.

Terminology update [breaking change]

Topos can now be said to be out of the alpha stage. However, function names were never clearly defined. The API emerged organically without any careful consideration about terminology. This is now causing issues with some functions drifting out of their original intent and their name not clearly reflecting what they actually do.

  • mod should be renamed beat since it now divides time based on beats. I suppose that onbeat is sufficiently well defined not to led to any confusion.
  • div could be renamed switch: it is indeed a boolean switched based on beats. However, this term is already a reserved keyword used by the language. A list of other possible terms could include swap or flip.
  • div method from array methods is also dividing in beats and thus should be merged with the actual beat method. The current beat implementation is just div with a default value set to 1! Even though this function emerged from div, it is not really div anymore.`
  • modbar and similar methods should be more transparent for the end user. It's currently very hard to decipher what they do even by reading the documentation.

With these simple modifications, I hope that the Topos sequencing model will already make much more sense for everyone.

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.