1

As part of a music festival, I have been asked to convert one of my piano compositions, titled "Fractal", into an electronic piece by playing around with timbres using MIDI data. Though I have a few ideas I would like to implement, I don't have experience with digital audio workstations nor electronic music in general.

In particular, the main idea I had in mind was to create a separate timbre -- constructed from a custom fractal-shaped waveform -- for each section of the piece. I did stumble upon this question, though I don't know how one could apply this to sections of MIDI data. Is this a viable idea?

EDIT: in response to the comments, I suppose that I really have two separate tasks I want to figure out how to do: a) I need a way to generate the waveforms for each pitch, and b) I need a way to play the MIDI data using these waveforms.

Dom
  • 47,095
  • 22
  • 150
  • 281
The Turtle
  • 161
  • 4
  • 1
    I'm not sure I'm understanding what you're asking. Do you mean that the sound should also be generated based on the midi data, not only (like standard sampling) its pitch? – musicamante Mar 19 '21 at 20:04
  • Without electronic music experience your best approach might be to collaborate and find a music tech to get you all set up with the custom fractal waveform patch and necessary controller and software so you can focus on performing – Todd Wilcox Mar 19 '21 at 20:39
  • 1
    Are you looking for a way to generate the waveforms, or are you looking for a way to play midi data using waveforms you've already generated? – Edward Mar 19 '21 at 22:06
  • If you want to play back "custom waveforms" isn't a sampler-kind of software exactly what you need? Do you already have wave files with the waveforms you have in mind? – user1079505 Mar 20 '21 at 04:23
  • To those voting to close the question: I don't think OP needs specific product recommendation, what they _seem_ to need (if only they can clarify they question) is a product _type_. – user1079505 Mar 20 '21 at 04:25
  • @musicamante if I’m understanding your question correctly, the sound should be generated with the MIDI data, but using a non-piano timbre. It would be something like “play the MIDI but use a square-wave timbre”, except “square-wave” is replaced by a different, custom waveform. – The Turtle Mar 20 '21 at 05:53
  • @Edward I’m looking for both, actually. Let me edit the question to make that clear. – The Turtle Mar 20 '21 at 05:54
  • @user1079505 I don’t have wave files with the waveforms I have in mind yet. (nor do I know how to generate them yet). And yes you are right, I’m essentially looking for a product type — a tool that can do what I want. – The Turtle Mar 20 '21 at 05:58
  • 3
    If you don't have waveforms and you don't know how to generate them, what do you mean by "fractal-shaped waveforms"? Perhaps all you need is to experiment with various software synthesizers, and e.g. effects as @Bennyboy1973 suggests, until you find the sounds you like? – user1079505 Mar 20 '21 at 06:09
  • I could probably be talked into collaborating on something like this. I once wrote a mensural fugue, with the idea that a simple sine wave could carry pretty much a whole universe of compositions. – Bennyboy1973 Mar 20 '21 at 06:40
  • @user1079505 I was thinking of a waveform similar to a Weierstrass function, or perhaps something similar like sin(n)+sin(2n)/2 + sin(4n)/4 + sin(8n)/8 ... I'm not exactly sure, since I'll have to play around for a bit before I get something that I want. – The Turtle Mar 20 '21 at 18:22
  • If n represents time in your formula, that's something many synthesizers could do easily. You tune the first oscillator to the base octave, second an octave higher, another two octaves above the base, and so on. – user1079505 Mar 20 '21 at 18:54
  • 1
    The problem is that for true Weierstrass waveform you'd need an infinite number of oscillators. Of course, physical sound reproduction equipment couldn't play it either and a human certainly wouldn't be able to tell it from approximation with frequencies above ~20KHz removed – ojs Mar 20 '21 at 20:58

3 Answers3

3

As you already figured out, MIDI has nothing to do with timbres or waveforms. MIDI is an interface and a command language for musical instruments to talk to each other, saying things like "Note On, C-5, velocity 100". How the recipient device reacts to that Note-On message could be literally anything. It could cause a stage light to move to a different position, or it could cause a MIDI-controlled tape deck to start playing, or it could cause a synthesizer to start making sound, or it could cause a MIDI-controlled garage door to open. I don't know if there are MIDI controlled garage doors, but if there is, the garage door will probably have an electric motor, which will produce an electrical waveform of some sort. If the waveform has a frequency between around 20Hz and 20kHz, and if it causes air vibrations at those frequencies, then the garage door motor makes a sound and the sound can be heard by a human. Whether a MIDI sequence playd on the garage door counts as electronic music, is a matter of opinion.

Notation applications can produce MIDI messages, working as sequencers. There are free notation applications such as MuseScore, which you could use for sending out the MIDI commands just fine, no "digital audio workstation" needed at all.

The device receiving the MIDI messages and producing the audio waveforms can be a piece of software or it can be an outboard MIDI synth, i.e. external hardware box or keyboard-type instrument that you connect to your computer via a MIDI interface and a MIDI cable. If it's a virtual synth or sampler or other sound-producing program, you connect it to the sequencer (for example MuseScore) via a virtual MIDI cable, which is a piece of software that routes MIDI messages from application A to application B. Or you could save out ("export") a MIDI file from the notation application and load it into a combined sequencer/synth application for playback, bypassing the need for a virtual MIDI cable.

I think this much you could have found out yourself by reading an introductory text or watching a tutorial about what MIDI is.

But then the more interesting question. How to create a waveform that you could legitimately call "fractal shaped"? Fractals are supposed to have "infinite detail", detail inside detail inside detail, reproducing variations of the same pattern or formula at many resolutions and scales, right? How do you do that, because audio only has finite resolution - how do you demonstrate fractal properties in an audio waveform? Is it enough if it just sounds weird and is accompanied by an explanation "something something fractal something", creating a science-mystic layer? Or do you have to be able to justify and defend the fractal claims?

This is just mumbling out my ad-hoc ideas, but to believe something is a fractal, I'd want to see repetitions of characteristics of a pattern occurring at many different scales of magnification. Our display screens have finite resolution just like audio, and fractal properties in images are demonstrated by zooming, i.e. changing the horizontal and/or vertical magnification scale of the display. So the demonstration cannot be just one static image, you have to provide several images or an animation with different scales. If we extend this thinking to audio, you'd have to show some kind of a display, something happening either in the time dimension (time domain) or frequency spectrum (frequency domain). Maybe if the visual shape of the waveform in time domain at some scale has a shape, and then, when looked at closer, similar shapes or characteristics could be found? Or what if the waveform itself morphed, creating a zooming in/out image, while keeping the oscilloscope zoom level the same? This would also cause changes in the sound itself, creating a morphing timbre! Or what if the spectrogram in frequency domain looked like a fractal?

One way to do this properly, in my opinion, would be by programming the audio-generating (virtual) device yourself. See topo's answer for ideas.

You had a requirement of the fractal-like properties being found in waveforms, and that suits the idea of playing an existing composition, but fractal-like properties have been claimed to be found in the rhythmic patterns/timings of Jeff Porcaro's drumming. https://phys.org/news/2015-08-fractals-patterns-drummer-music.html Fascinating? Nonsense? You decide.

piiperi Reinstate Monica
  • 26,045
  • 1
  • 33
  • 85
  • Thank you for your response! Regarding your question "how to create a waveform that you could legitimately call 'fractal shaped'?" I was actually planning on making a waveform that looks similar to, say, the Weierstrass function or some (not totally non-differentiable) variants thereof. So I suppose, yes, this would justify the fractal claims. I doubt one could actually "hear" the fractal nature of the waveform, but it would make for an interesting experiment. The frequency domain fractal idea also seems interesting, but it wasn't what I was going for. – The Turtle Mar 20 '21 at 18:14
  • The Weierstrass function could at least be an interesting experiment. I wonder what happens if you zoom into the function or make the a/b/c parameters adjustable? So that it would generate a single cycle of the wave, or a wavetable entry. Zooming in would take a narrower window between 0..1. This would require a bit of programming. – piiperi Reinstate Monica Mar 21 '21 at 20:39
1

There are quite a few ways you could go about this, depending on how much 'conventional' music technology you are happy to use.

One straightforward way to play a custom waveform using MIDI data is to load that waveform (as an audio file) into a sampler, or any other synthesizer that can load samples.

These days, pretty much any 'DAW' (Digital Audio Workstation) software will be able to load a sampler 'plug-in', and control that with MIDI data.

From your other SE accounts, it looks like you're a coder, so you should be able to write a function that generates the fractal as a 'function'.

So as a first, very simple approach, you could

  • Write some code to sample the fractal function, and (possibly using an audio library of some kind), write this to an audio file (sucn as a .wav or .aiff file). You might want to find a section of the function's domain that has the same values at the start and end, so that you get a 'smooth' waveform when that section is copied end-to-end to play a note at a certain frequency.
  • Use your sampler plug in in your DAW to load in the waveform and control it with MIDI.

There will be a few refinements that you could make to the process - you might want to write your function-sampling code in a way that uses filtering to avoid aliasing, and you will want to experiment with finding a satisfying sections of fractal 'shape' to use as your samples.

Нет войне
  • 45,699
  • 3
  • 75
  • 157
  • Thank you for your response! Your answer (along with piiperi's) seem to be the most promising so far. It seems like what I want to go for is what you outlined: somehow use a DAW to load a sampler 'plug-in', and use this to generate the final audio file. I suppose that once I generate the waveform for a specific frequency, the DAW can handle the rest and generate the waveforms for all other frequencies -- is this correct? – The Turtle Mar 20 '21 at 18:18
  • @TheTurtle yes, that's correct. One think you could perhaps consider to incorporate some of piiperii's ideas would be using a granular synth, rather than a straight 'sampler' - the granular synth would allow you to change your grain size and potentially move along and look at different parts of your waveform.... – Нет войне Mar 20 '21 at 20:31
0

MIDI's the wrong tree to bark up, I think. What you need is a DAW and a few good VST plugins.

I recommend taking a look at a few sample of "ring modulation" on Youtube. I like this one, from about 13:00 to 15:00 or so. My suggestion is to have a series of ring mods, so you resolve ONE to a new sound, then use the NEXT one to morph that into a new waveform:

This video is not the most musical application, but it is a pretty good explanation of how ring mods work.

Bennyboy1973
  • 3,933
  • 1
  • 5
  • 17