All Projects → alecominotti → hydracodegenerator

alecominotti / hydracodegenerator

Licence: GPL-3.0 license
Generate Hydra code randomly. Livecode it

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
python
139335 projects - #7 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to hydracodegenerator

Flok
Web-based P2P collaborative editor for live coding sounds and images
Stars: ✭ 119 (+440.91%)
Mutual labels:  hydra, livecoding
hydra-antlia
A collection of functions for Hydra
Stars: ✭ 45 (+104.55%)
Mutual labels:  hydra, livecoding
facet
Facet is a live coding system for algorithmic music
Stars: ✭ 72 (+227.27%)
Mutual labels:  livecoding, livecode
larastreamers
There is no better way to learn than by watching other developers code live. Find out who is streaming next in the Laravel world.
Stars: ✭ 184 (+736.36%)
Mutual labels:  livecoding
tidal-maxmsp
Connecting the Tidal live coding environment to MaxMSP
Stars: ✭ 34 (+54.55%)
Mutual labels:  livecoding
melrose
interactive programming of melodies, producing MIDI
Stars: ✭ 130 (+490.91%)
Mutual labels:  livecoding
t3api
TYPO3 extension t3api. REST API for your TYPO3 project. Config with annotations, built in filtering, pagination, typolinks, image processing, uploads (FAL), serialization contexts, responses in Hydra/JSON-LD format.
Stars: ✭ 28 (+27.27%)
Mutual labels:  hydra
gatling
Hydra-enabled GPU path tracer that supports MaterialX and MDL.
Stars: ✭ 159 (+622.73%)
Mutual labels:  hydra
aeon
A live-coding system for musical pattern manipulation
Stars: ✭ 22 (+0%)
Mutual labels:  livecoding
tidal-looper
Different looper variants for SuperDirt to provide live sampling in TidalCycles.
Stars: ✭ 55 (+150%)
Mutual labels:  hydra
negasonic
This ain't Sonic Pi, but it works on the browser: www.negasonic.org
Stars: ✭ 73 (+231.82%)
Mutual labels:  livecoding
CommandGenInterface
Simple vueJS based command generator which I developed in order to learn vueJS a little bit more.
Stars: ✭ 17 (-22.73%)
Mutual labels:  hydra
RaycastVisualization
This asset allows users to view raycasts as the user fires them.
Stars: ✭ 61 (+177.27%)
Mutual labels:  visuals
braid
Polyrhythms in Python: a sequencer and musical notation system for monophonic MIDI synths
Stars: ✭ 34 (+54.55%)
Mutual labels:  livecoding
livecodingspace
LiveCoding.space
Stars: ✭ 24 (+9.09%)
Mutual labels:  livecoding
lightning-transformers
Flexible components pairing 🤗 Transformers with Pytorch Lightning
Stars: ✭ 551 (+2404.55%)
Mutual labels:  hydra
glicol
(Audio) graph-oriented live coding language and music DSP library written in Rust
Stars: ✭ 853 (+3777.27%)
Mutual labels:  livecoding
rs
rs - the Racket Sequencer
Stars: ✭ 16 (-27.27%)
Mutual labels:  livecoding
hydra
A command-line utility for generating language-specific project structure.
Stars: ✭ 18 (-18.18%)
Mutual labels:  hydra
lightning-asr
Modular and extensible speech recognition library leveraging pytorch-lightning and hydra.
Stars: ✭ 36 (+63.64%)
Mutual labels:  hydra

Hydra Code Generator

Generate Hydra code randomly. Livecode it.

Hydra Code Generator


English
  • HCG is an app that randomly generates basic code in Hydra sintax. The sources, functions, the amount of them and the values of their arguments are all generated randomly (within customizable lower and upper bounds). You can also specify the probability of generating certain arguments and which elements you want in your generated code and which you don't. The Live Session Mode allows you tu execute in Hydra the generated code, and also to livecode from this app. HCG aims to allow you to explore the infinite creation posibilities that Hydra provides, combining them with the art of randomness and the user customization, allowing you to find inspiration, new ideas or just pass the time.
Español
  • HCG es una app que genera código básico en sintaxis de Hydra de manera aleatoria. Las sources, functions, la cantidad de ellas y los valores de sus argumentos son todos generados aleatoriamente (dentro de rangos personalizables). También puedes especificar la probabilidad de que se generen determinados argumentos y establecer cuáles elementos quieres en tu código generado y cúales no. El Live Session Mode te permite ejecutar en Hydra el código generado, así como también hacer livecoding desde esta app. HCG tiene como objetivo ayudarte a explorar las infinitas posibilidades de creación que provee Hydra, combinándolas con el arte de lo aleatorio y la personalización del usuario, para encontrar inspiración, nuevas ideas o simplemente pasar el rato.
    En la pestaña de ayuda dentro de la app está la documentación completa en español.

Installation instructions

You must have Python 3 and Google Chrome installed.

Linux and Mac:

  • Open up a terminal and clone the directory, typing:
    git clone https://github.com/alecominotti/hydracodegenerator.git
  • Enter the directory:
    cd hydracodegenerator
  • Install dependencies (please enter your password if prompted):
    sudo python3 install.py
  • Run the app:
    python3 manage.py runserver

Windows:

  • Open up a terminal (program called "cmd") and clone the directory, typing:
    git clone https://github.com/alecominotti/hydracodegenerator.git
  • Enter the directory:
    cd hydracodegenerator
  • Install dependencies:
    py install.py
  • Run the app:
    py manage.py runserver

Then go to http://127.0.0.1:8000/ in the browser.


For Mac users, if you are getting a “chromedriver” cannot be opened because the developer cannot be verified error, go to the Mac Chromedriver path in your terminal (hydracodegenerator/webdrivers/mac) and run:

xattr -d com.apple.quarantine chromedriver


Live Session Mode

If you turn this on, Hydra will be opened in a web browser, and you will be able control it from this app. Live Session mode allows you to write and run random generated code automatically, and also to livecode in Hydra from the app itself. Since this is a web app, you can control and livecode in Hydra from a phone, tablet or other computer in your local network.

If you wish to livecode from a phone, table or other computer, you need to run the app with the following command:

python3 manage.py runserver LOCAL_IP:PORT

  • You can choose any port number you want between 1024 and 65535.
  • Get your local IP in Linux terminal: hostname -I
  • Get your local IP in Mac terminal: ipconfig getifaddr en0
  • Get your local IP in Windows terminal: ipconfig | findstr IPv4

Example: if your local IP is "192.168.0.15" you could start the app with python3 manage.py runserver 192:168.0.15:6969 (On Windows replace 'python3' with 'py'). Then in your phone browser go to 192.168.0.15:6969

Hide Keys

This toggle lets your hide or show the code in the Hydra window if a Live Session is active.

Auto Run

If you turn this on, the new generated code will automatically be written and executed in Hydra when you click the Generate Code button, if a Live Session is active. Leave this turned off if you want to livecode from this app.

Generate Code

Click this button to generate new code with the parameters you set. If a Live Session is active and Auto Run is on, the new generated code will be written and executed in Hydra automatically. Don't worry about loosing them. All generated codes are saved in a text file called "generatedCodeHistory.txt", located on the root folder of the app.

Run in Hydra

Click this button to execute the code of the editor in Hydra. This button is useful for remote livecoding and it's only available if a Live Session is active. You can also execute the code of the editor by clicking Ctrl+Shift+Enter.


Customize randomness:

Min Function Amount

Here you specify the minimum amount of functions that the generated code can have

Max Function Amount

Here you specify the maximum amount of functions that the generated code can have

HCG will generate a random number between these two values and that number will be the amount of functions of the generated code. If you set the same number for both values, the amount of functions will always be the same.

Example: Min function amount: 3. | Max Function amount: 3. Possible output:

osc(2, 1, 1)  // This is a source
  .colorama(0.5)  // This is a function
  .luma(0.2)  // This is a function
  .pixelate(2.5)  // This is a function
.out(o0)

Min Argument Value

Here you specify the minimum value that the arguments of the generated code can have

Max Argument Value

Here you specify the maximum value that the arguments of the generated code can have

HCG will generate a random number between these two values for every argument of the sources and functions of the generated code. If you set the same number for both values, the arguments will always be the same.

Note: solid, brightness, luma, color, invert, posterize, thresh, add, blend, mult and modulate generate they own random value between 0 and 1, to avoid possible "dull" sketches. Anyways, you can manually change the values and run the code again if you want.

Example: Min argument value: 10. | Max Argument value: 15. Possible output:

osc(11, 10.5, 13.2)
  .colorama(14.9)  // This is a function
  .saturate(12.7)  // This is a function
  .pixelate(10.3)  // This is a function
  .brightness(0.4)  // This is a function that will generate its own argument value between 0 and 1
  .modulate(o0, 0.2)  // This is a function that will generate its own modulation amount value between 0 and 1
.out(o0)

Arrow Function Probability

Here you specify the probability of generating an arrow function as an argument value, that uses Math functions like sin, cos and tan

If you set this value to 100, every argument will have a 100% chance of being an arrow function, so they will all be arrow functions. This does not apply to functions that generate their own value between 0 and 1.

Example: Arrow Function probability: 100. Possible output:

osc(() => Math.sin(time), () => Math.cos(time * 0.3), () => Math.tan(time))
  .colorama(() => Math.sin(time * 0.5))
  .pixelate(() => Math.cos(time * 0.7))
.out(o0)

Mouse Function Probability

Here you specify the probability of generating a mouse arrow function as an argument value

If you set this value to 100, every argument will have a 100% chance of being a mouse arrow function, so they will all be mouse arrow functions. This does not apply to functions that generate their own value between 0 and 1.

Example: Mouse Function probability: 100. Possible output:

osc(() => mouse.x, () => mouse.x), () => mouse.y)
  .colorama(() => mouse.x)
  .pixelate(() => mouse.y)
.out(o0)

Modulate itself Probability:

Here you specify the probability of setting "o0" as the first argument of any modulate function.

If you set this value to 100, every generated modulate function will have a 100% chance of having "o0" as its first argument, so they will all modulate the output with itself.

Example: Modulate itself probability: 100. Possible output:

osc(10, 0.5, 1)
  .colorama(1)
  .modulateScale(o0, 0.3)
  .modulate(o0, 0.8)
.out(o0)

Exclusive sources

Here you specify the only sources you want in the generated code.

For instance, if you only select "osc", every generated source will be an oscillator.

Example: only "osc" selected. Possible output:

osc(10, 0.5, 1)
  .colorama(1)
  .modulateScale(osc(12, 2, 3), 0.3)
  .modulate(osc(1, 0.2, 1.5), 0.8)
.out(o0)

Exclusive Functions

Here you specify the only functions you want in the generated code.

For instance, if you only select "colorama", every generated function will be a colorama.

Example: only "colorama" selected. Possible output:

voronoi(10, 0.5, 1)
  .colorama(1)
  .colorama(0.3)
  .colorama(3)
.out(o0)

Ignore List

Here you specify the elements (sources and functions) that you don't want in the generated code.

For instance, if you select "luma", the generated code will never contain a luma function.

Example: only "luma" selected. Possible output:

voronoi(10, 0.5, 1)
  .colorama(1)
  .brigthness(0.1)
  .modulate(o0, 0.4)
.out(o0)

Links:



Ale Cominotti - 2021
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].