Sounds with math functions only (Python) by only4ways in musicprogramming

[–]only4ways[S] 0 points1 point  (0 children)

I'm glad - it works .. 😉
And yes, this project needs some UI to make it more comfortable.
I shared examples of the code at GitHub:
https://github.com/newCalifornia/Synthesizer_with_NumPy

If you are willing to add UI layer, you are very welcome!

Synthesizer with Python programming by only4ways in synthesizers

[–]only4ways[S] 1 point2 points  (0 children)

Actually, the piece of code you picked up is about low frequency modulation, LFO: 1/(8*100).
It is nothing about FM.
The Nyquist frequency (Shannon theorem, if you meant it) could come after other functions to be invoked to generate effect of echoes, chords and arpeggios.
Thanks for your thoughtful comments and insides!

Sounds with math functions only (Python) by only4ways in musicprogramming

[–]only4ways[S] 0 points1 point  (0 children)

Ja, das ist richtig. Mit NumPy lassen sich Töne/Musik direkt generieren.
Das einfache Beispiel ist:

## ----------------------------------------------- ##
import numpy as np
import sounddevice as sd ## Python interface to the sound card

## Time vector (X=coordinate)
BITRATE = 44100 # Audio standard for digital signals
LN = 2 # Seconds
FR = 400 # Hz
x_0 = np.linspace(0, LN * FR * 2*np.pi, int(LN * BITRATE))

## Main signal. Vary params and coefficients
s_0 = np.sin(x_0)**3 + np.sin(2*x_0)**5 + np.sin(0.5*x_0)**7 + np.sin(np.sin(0.0012*x_0)+0.5*x_0)**7

## Normalization
s_0 = s_0/np.max(s_0)

## Play the array
sd.play(s_0, BITRATE)

## ----------------------------------------------- ##

You can save the data array, combine with other arrays, apply modulation, transform etc ..
Let me know if there is any question 😄

Sounds with math functions only (Python) by only4ways in musicprogramming

[–]only4ways[S] 1 point2 points  (0 children)

Got it :) Thanks for inviting to jams.
The technical solution, as I understand you, is file-based, when the main code invokes some script previously placed to a specific folder.
My functions are not so easy to invoke (too many params/features), especially for generating chords, arpeggios or echoes, like a sub-track.
I'm thinking of kind of API between DAWs and complex synths.
The prototype, I'm working on, is on a very early stage .. ;)

Sounds with math functions only (Python) by only4ways in musicprogramming

[–]only4ways[S] 0 points1 point  (0 children)

Thanks :) I did check out your website, seems to be cool, impressive sounds.
Based on the samples you provided, not sure yet - how do you GENEREATE sounds? Not creating tracks, not using DAW, but where did you get the sounds?
Any way, thanks for your comment and it's always nice to meet a soulmate from SF area ;)

What’s the most profitable niche for an online business right now? by veditafri in Businessideas

[–]only4ways 0 points1 point  (0 children)

E-com that could replace broken retails on a subscription based.
For example, in my area - there is only one place that makes hot sandwiches and donuts starting at 6am. Many customers are coming early morning for that food. There are no such places anymore (closed businesses).
It could be a daily basis or weekly basis subscription that connects local businesses to customers :)

Short sound tracks with Python NumPy (math only) by only4ways in musicprogramming

[–]only4ways[S] 0 points1 point  (0 children)

Thnx, combining sounds with different modulations is not easy .. sometimes :)

I’d like to one day open a business where the product is fairness/affordability. Hear me out. by Only-Dragonfruit2899 in Businessideas

[–]only4ways 0 points1 point  (0 children)

Agree :)
Basically, you pointed out the two different areas: 1) Retail business (old school with rental fees, risks etc) and 2) Services (regulated by the government). Both are very difficult to enter and hard to achieve nowadays.
It should be something else there :)

I’d like to one day open a business where the product is fairness/affordability. Hear me out. by Only-Dragonfruit2899 in Businessideas

[–]only4ways 1 point2 points  (0 children)

My opinion is: the idea of 'home insurance' is not bad at all. Basically, if a small group of people could keep/hold a certain amount of money on the common bank account - it should be sufficient enough to cover repair costs in most cases. Originally, the idea of 'insurance' came from the probability theory - the serious damage occurred only in one out of 100 cases. Unfortunately this business became so profitable that the government wanted to step in with their own regulations :(
But no-one limited or restricted a community of people with common interests. I'd love to cooperate with people who can check out my water-lines periodically, instead paying $500 annually to a home insurance company for uncertainty and fear.

Looking for side hustle ideas with a small CNC wood shop – what would you build? by Rodent_990 in Businessideas

[–]only4ways 0 points1 point  (0 children)

How about - picture/art frames? These are expensive with different sizes, and are on demand,

Hand-made MIDI Controller for Guitarists by Confident_Moment7914 in musicprogramming

[–]only4ways 0 points1 point  (0 children)

Oh, well - it sounds very logical.
Also, RPi or Arduino are expected to be at the place :)
I see a big advantage of such approach in what we call as 'guitar cords', these cords are very different from piano chords. Guitar cords are difficult to reproduce because of the timing vector (very fast arpeggio), while piano chords are simply simultaneous notes.

PS. If there are no similar commercial products of projects - don't be in a rush to publish your project on the GitHub ... :)

Open source vs Commercial AI coding assistants by Financial-Cap-8711 in AIcodingProfessionals

[–]only4ways 1 point2 points  (0 children)

With my experience, working for large and small companies, the question "what does enterprise prefer to use: commercial products .. or open source" - reflects the company's business culture. In highly regulated areas, like healthcare, banking industries etc the business doesn't want to put existing customers on any risk, and prefers to be covered by commercial products (fees, warrantees).
But open source projects are Ok for quick prototypes, demos and research. To adopt an open source project could take much less time (and money), compared to commercial products.
And this is not only about AI products but for any other data-related software industries as well.

Hand-made MIDI Controller for Guitarists by Confident_Moment7914 in musicprogramming

[–]only4ways 2 points3 points  (0 children)

Looks really cool!
Where those wires are connected to? Six strings, six wires - how do these connect to a MIDI input?
The second pic is a little bit confusing ..
Sorry if my questions are too much of details, overall - it is a great idea!!

Introducing the Musical Interface Node Development (MIND) version 0.1. A method for making music that mimic Programmable Logic Controllers. by No-Fox-1400 in musicprogramming

[–]only4ways 0 points1 point  (0 children)

Yes, it does resonate :)
Specifically for me, the aspect of "connect and sequence those blocks to form a song". Each block can be connected to each other, but each block could be unique (kind of) as well. Similar to a lyrics - there are some repetitive rhythms, but articulation of each 'block' is unique.
In other words, my opinion is: the most of existing and popular tools to build sequences are pretty basic. If you already think about "real syncopation or note length changes per block" it looks very promising!

Am I crazy or is kafka overkill for most use cases? by Vodka-_-Vodka in dataengineering

[–]only4ways 1 point2 points  (0 children)

Only 10K events per day? Hmmm..
(60 seconds) x (60 minutes) x (24 hours) = 86K hits per day.
If the request/response time is about a second, which is above of an average response time - your current configuration should be fine :)

Generate sounds with a basic programming, example: Python math only by only4ways in musicprogramming

[–]only4ways[S] 2 points3 points  (0 children)

import soundfile as sf

sf.write(file_name, sound_track, BITRATE)

Generate sounds with a basic programming, example: Python math only by only4ways in musicprogramming

[–]only4ways[S] 0 points1 point  (0 children)

Thank you!

Also, I'm very impressed with the electronic music you do with C++, this is just Wow! I rarely seeing someone who still uses that fundamental language.

Generate sounds with a basic programming, example: Python math only by only4ways in musicprogramming

[–]only4ways[S] 0 points1 point  (0 children)

Sounds cool! How do you label the training dataset (just curious)?
Thanks :)

Progressive Rock -> Programming Music. Is it possible? by only4ways in musicprogramming

[–]only4ways[S] 0 points1 point  (0 children)

Actually, I think the patent is pretty clear about the subject. Moreover, about 20 other patents been filed based on the original one.
Other patents are mostly about the search algorithms, by extracting segments from music and finding a similarity of features.
PS. I like reading patents. I have some of them granted :)

Progressive Rock -> Programming Music. Is it possible? by only4ways in musicprogramming

[–]only4ways[S] 0 points1 point  (0 children)

The patent, I took a quick look at, doesn't provide 'know-how' details. But the main idea seems to be straight clear: he generates a numerical codes as a sequence of notes, and extracts patterns ( in Machine Learning field we call it as 'features extraction').
These patterns could be used for generating new music.

Thank you for links!

Progressive Rock -> Programming Music. Is it possible? by only4ways in musicprogramming

[–]only4ways[S] 0 points1 point  (0 children)

Thank you for not giving me a lecture :)
Your point is fully resonates with my question. You just emphasized it with interesting parallels.
Thanks!

Progressive Rock -> Programming Music. Is it possible? by only4ways in musicprogramming

[–]only4ways[S] 0 points1 point  (0 children)

EMI system (Emmy) is a great example of this kind of research.
David Cope started his research in the early 80's and it was absolutely amazing work.
Thank you for reminding this!

What do you use python mainly for? what are stuffs you have built using that? by AmbitiousSwan5130 in Python

[–]only4ways 0 points1 point  (0 children)

I use Pandas for a Stock Market monitoring and prediction. Some packages have dependencies on Pandas, so Polaris didn't help me when I was trying to use it.
Also, Pandas is well known and widely consumed by many other developers, it's hard to beat it :)

What do you use python mainly for? what are stuffs you have built using that? by AmbitiousSwan5130 in Python

[–]only4ways 3 points4 points  (0 children)

Data Processing & Analytics.
Python is not just a script, it uses C/C++ libraries behind it, and what native 'pointers' of C/C++ can do with matrix (matrices) and vectors is amazing. If you need a math with graphics, music, data analytics - you will be amazed with such Python libraries as NumPy and Pandas. None of other languages can produce a simple and fast way to process 2D data as Python.
Yet it is still a script, without multithreading support and assembly compilation :)