binary-synth

所属分类:内容生成
开发工具:Vue
文件大小:0KB
下载次数:0
上传日期:2023-08-20 14:40:21
上 传 者sh-1993
说明:  用于音频生成的二进制文件解释器,
(Binary file interpreter for audio generation,)

文件列表:
.prettierrc (492, 2023-11-11)
LICENSE (1069, 2023-11-11)
dist/ (0, 2023-11-11)
dist/index.html (736866, 2023-11-11)
index.html (311899, 2023-11-11)
package-lock.json (39825, 2023-11-11)
package.json (485, 2023-11-11)
public/ (0, 2023-11-11)
public/favicon.ico (15086, 2023-11-11)
public/og.png (17528, 2023-11-11)
src/ (0, 2023-11-11)
src/BinarySynth.vue (1431, 2023-11-11)
src/assets/ (0, 2023-11-11)
src/assets/js/ (0, 2023-11-11)
src/assets/js/fourierCoefficients.js (5958, 2023-11-11)
src/assets/js/getFrequency.js (643, 2023-11-11)
src/assets/js/getMIDINote.js (2568, 2023-11-11)
src/assets/js/helpers.js (1051, 2023-11-11)
src/assets/js/midi.js (571, 2023-11-11)
src/assets/js/notes.js (1917, 2023-11-11)
src/assets/styles/ (0, 2023-11-11)
src/assets/styles/main.scss (311529, 2023-11-11)
src/assets/styles/normalize.css (6342, 2023-11-11)
src/assets/styles/vars.scss (150, 2023-11-11)
src/components/ (0, 2023-11-11)
src/components/ControlPanel.vue (35857, 2023-11-11)
src/components/ControlPanel/ (0, 2023-11-11)
src/components/ControlPanel/Filter.vue (1799, 2023-11-11)
src/components/ControlPanel/Frequency.vue (6081, 2023-11-11)
src/components/ControlPanel/Global.vue (6867, 2023-11-11)
src/components/ControlPanel/LFO.vue (2897, 2023-11-11)
src/components/ControlPanel/Midi.vue (4842, 2023-11-11)
src/components/ControlPanel/Oscillator.vue (1353, 2023-11-11)
src/components/FileInput.vue (6466, 2023-11-11)
src/components/Status.vue (9400, 2023-11-11)
src/main.js (205, 2023-11-11)
src/stores/ (0, 2023-11-11)
... ...

# Binary Synth _Binary file interpreter for audio synthesis_ [![Uptime Robot status](https://img.shields.io/uptimerobot/status/m795264551-bb4c959b31b6ff94b02f9545)](https://bs.stranno.su) [![Uptime Robot status](https://img.shields.io/uptimerobot/ratio/m795264551-bb4c959b31b6ff94b02f9545)](https://bs.stranno.su) **Demo**: https://bs.stranno.su ![](https://store.stranno.su/bs/fuji.png) _Эта страница есть также на русском_ All data on any computer or smartphone is in the form of files. The contents of these files are ultimately just zeros and ones. And these zeros and ones are basically all the same, so we need an interpreter to extract meaning from these texts. Basically, the file format (.mp3, .docx, etc.) is just a pointer to which interpreter we need to pass the text in order to extract meaning from it. But what if the file format and the interpreter don't match? In the case of musical experimentation, there have been earlier attempts, for example, to "play" a file through an audio editor, which expectedly produced mostly glitch and noise; it might be interesting more from a conceptual than a musical point of view. We could go further and write our own interpreter that would look at the files without regard to format, use its own "manner of reading" the original zeros and ones, and on that basis provide a complete system for controlled synthesis of sounds. ## Application principle 1. We can interpret files as an array of numbers. That is, we divide continuous machine code (ArrayBuffer) into _words_ of some information capacity (bitness): - 8 bits (numbers from 0 to 255) - 16 bits (numbers from 0 to 65 535) 2. Then, each word is a command that defines the frequency of the sound 3. At the level of the whole system, we set global parameters: - speed of interpretation - musical scale (or lack thereof), range of notes/frequencies - looping - MIDI mode - smooth or abrupt transition between commands - settings of virtual devices required for synthesis (oscillator, filter, LFO) or MIDI settings 4. To reduce the load on the device, we divide the file into chunks of 500 commands each 5. Recursively schedule the synthesis control by reading 500 instructions per iteration and using global parameters 6. If we have reached the end of the file, stop execution or start again ## MIDI When the MIDI mode is enabled, the first available port and its first channel are automatically selected. Next, a noteOn signal is sent sequentially when reading, and a noteOff signal is sent after the Reading speed time. In Continuous mode, a Pitch signal is sent after each noteOn to hit the desired frequency. MIDI messages can be sent: - to neighboring tabs and browser windows if they are listening to MIDI (e.g., in the web analog [DX7](http://mmontag.github.io/dx7-synth-js)) - in DAW and other applications with virtual synthesizers (i.e. BS can control, for example, synthesizer in Ableton). - to MIDI-compatible external devices connected to a computer To send MIDI messages to a DAW on Windows devices, you can use [loopMIDI](https://www.tobias-erichsen.de/software/loopmidi.html). > **Note**: After any manipulations with MIDI ports (connection/disconnection/re-connection) it is necessary to completely restart the browser, closing all browser windows if there are several of them > **Note**: MIDI messages are generated on the desktop only ## Run locally and build the project ### Just copy the app Everything you need for the system is contained in a single `.html` file, which you can download in the `dist` folder, or simply go to https://bs.tranno.su and right-click and select Save As in the menu. ### Build locally to work with the code Tech stack: Vue3 + Pinia + Vite. 1. Download and install the LTS version of Node.js 2. Download the code directly from Github, or via `git clone`. 3. In the project folder in the terminal execute: ```bash npm i npm run dev # development-build npm run build # production-build, generate index.html with everything we need ``` For MIDI tests, you can use this resource https://studiocode.dev/midi-monitor/ ## Interface features - Reading speed - interpretation speed; at high speeds over 0.001 the application may become unstable - Bitness - we can divide the binary code into words of 8 or 16 bits, which changes the number of available frequencies (256 or 65536). - Frequency generation mode - continuous - continuous frequency distribution - tempered - distribution by 12-step equal-tempered scale. Numbers denote the note number from C-1 to H7. - Transition type - transition between frequencies - immediate - instantaneous, rough transition - linear - linearly to the next frequency - exponential - exponentially to the next frequency - Random time gap - adds a random amount of time to the next tone within the Reading speed parameter. Makes the sound less "robotic", as the distance to each tone is slightly different and it adds more "liveliness" to the game - Commands range - allows to play not the whole file, but a certain part of it.

近期下载者

相关文件


收藏者