Dammit ChatGPT

ChatGPT prompt: Describe a modular synthesizer patch for generative music.

A modular synthesizer patch for generative music would involve several key components:

  1. A clock source, such as a pulse generator or sequencer, to provide a steady tempo for the music.
  2. A random voltage generator, which is used to create variations in the musical notes or rhythms.
  3. A variety of sound-generating modules, such as oscillators, filters, and envelopes, which are used to create the actual sounds.
  4. A mixers, to balance the levels of the different sound sources.
  5. A low-frequency oscillator (LFO), which is used to modulate the parameters of other modules, such as the pitch of an oscillator or the cutoff frequency of a filter, creating movement and complexity in the sound.
  6. Some utility modules like quantizer, to constrain the random voltage to specific scales or chord progressions and a stereo panning module to add some spatial movement to the sound.
  7. Finally, a way to record or output the audio, such as an audio interface or a module with a built-in recorder.

The specific configuration of the patch would depend on the desired outcome, but this would be a general setup to create generative music using a modular synthesizer.

A modular synthesizer patch for generative music would typically consist of several modules that are connected together to create a self-generating system. The patch would likely include a sequencer module, which would be used to generate a series of musical notes or events, as well as a random voltage generator, which would be used to add variations and randomness to the sequencer’s output.

The patch would also likely include a number of sound-generating modules, such as oscillators and noise generators, which would be used to create the raw audio signals that make up the music. These signals would then be processed through a variety of other modules, such as filters, amplifiers, and effects, to shape the final sound.

Finally, the patch would likely include a control voltage module, which would be used to connect the various elements of the patch together and control the flow of audio and control signals between them. This would allow the user to create complex, evolving, and dynamic generative music.

(same prompt, different output)

If you repeat the same prompt you always get different output. Same with image generators like Dall-E. I don’t know why this is but I suspect there’s a hidden layer in the engine that injects randomness.

Sure is fun to play with ChatGPT.

It helped me optimize my wavetable generator speed 1000x. Very nice.

Today, I’m ChatGPT and I are writing ESP32 arduino software to output the positions of two analog joysticks as 14-bit midi over USB.

Summary
It builds, but is not tested yet.

/*
Arduino on ESP32-C3-DevKitM-1
*/


#include <Adafruit_TinyUSB.h>
#include <MIDI.h>
#include "PCF8575.h"

struct Joystick {
  int objectNumber;
  String objectName;
  int analogInputPort;
  int muxAaddress;
  int muxBaddress;
  int CCnumberMSB;
  int CCnumberLSB;
  float previousValue;
};

// Create an array of joystick objects
Joystick joysticks[] = {
  {1, "Joystick A X", 34, 0, 0, 1, 33, 0.0000},
  {2, "Joystick A Y", 34, 1, 0, 2, 34, 0.0000},
  {3, "Joystick B X", 34, 2, 0, 3, 35, 0.0000},
  {4, "Joystick B Y", 34, 4, 0, 4, 36, 0.0000}
};

// Create a PCF8575 object
PCF8575 pcf8575;

// USB MIDI object
Adafruit_USBD_MIDI usb_midi;

// Create a new instance of the Arduino MIDI Library,
// and attach usb_midi as the transport.
MIDI_CREATE_INSTANCE(Adafruit_USBD_MIDI, usb_midi, MIDI);


void setup() {
  // Initialize the PCF8575
  pcf8575.begin();
  // Initialize the MIDI interface
  MIDI.begin();
}

void loop() {
  for (int i = 0; i < sizeof(joysticks)/sizeof(joysticks[0]); i++) {
    // Select the pot
    pcf8575.write(joysticks[i].muxAaddress, joysticks[i].muxBaddress);

    // Read the joystick value
    int joystickValue = analogRead(joysticks[i].analogInputPort);
    // Filter noise
    joystickValue = filterNoise(joystickValue, i);

    // Normalize the value to a float in the range 0-1
    float normalizedValue = (float)joystickValue / 1023.0;

    if (normalizedValue != joysticks[i].previousValue) {
      // Send MIDI message MSB
      MIDI.sendControlChange(joysticks[i].CCnumberMSB,normalizedValue * 127, 1);
      // Send MIDI message LSB
      MIDI.sendControlChange(joysticks[i].CCnumberLSB, map(normalizedValue, 0, 1, 0, 127), 1);
      // Blink the LED
      digitalWrite(LED_BUILTIN, HIGH);
      delay(50);
      digitalWrite(LED_BUILTIN, LOW);
      // Update the previous value
      joysticks[i].previousValue = normalizedValue;
    }
  }
}

// Function to filter noise
float filterNoise(int value, int objectIndex) {
    // State variables
    static float x_est_last = 0;
    float x_temp_est;
    static float P_last = 0;
    float P_temp;

    // Measurement variables
    float z = value;
    float R = 0.01; // Measurement noise

    // Kalman gain
    float K;

    // Time update
    x_temp_est = x_est_last;
    P_temp = P_last + 0.01;

    // Measurement update
    K = P_temp / (P_temp + R);
    x_est_last = x_temp_est + K * (z - x_temp_est);
    P_last = (1 - K) * P_temp;

    // Update the previous value
    joysticks[objectIndex].previousValue = x_est_last;

    return x_est_last;
}

This week, every news source I look at has had articles on ChatGPT! Does this mean that the singularity is near? :wink:

1 Like

Dangerous territory here - it’s tempting to put “Describe a modular synthesizer patch that accurately reproduces the sound of a Grand Piano/Cow Fart/Zappa Guitar Solo”.

1 Like

Microsoft, Multi billion dollar - say no more.

I asked “Does ChatGPT outsmart Vernor Vinge ?”

As a language model, ChatGPT is capable of processing and understanding large amounts of text data, but it does not have consciousness or self-awareness and it can not outsmart Vernor Vinge or any human being. ChatGPT is a tool that can assist people in various tasks, but it is not capable of independent thought or decision making. Vernor Vinge is a renowned computer scientist and science fiction author, and his contributions to the field of artificial intelligence and the concept of singularity are still widely discussed and studied today.

It’s not going to claim superiority anytime soon me thinks.

I learned something. I did not realize that Kurzweil got his singularity ideas from Vinge. It’s been a long time since I read Vinge, but now also a while since I read Kurzweil.

I wonder if there is a rule in ChatGPT that says “Don’t claim to be conscious or able to pass the Turing test.”.

1 Like

I did ask it if I told it something with a code would it be able to recall it later and the reply was something like it can only recall information that has been fed to it by whoever is in charge of the system and use knowledge it extrapolated from that along with the last bit of user input in the current session. I guess they learned the lesson from Microsoft and that AI bot that users turned fascist inside 2 days on Twitter :slight_smile:

1 Like

It replies

Golden scales shine bright

Memories in the fishbowl swirl

Eternity in a gaze.

It obviously has its own idea how haiku works

1 Like
4 Likes

This is very impressive. I have been involved in A.I. for at least 58 years now. I had to go back to my research notebooks from when I was 14 in 1966 and was drawing systems flow diagrams trying to model human consciousness. I did a variety of chatbots over the years, including in the metaverse commercial system I developed from 2004-2008 and commercial expert system in Prolog and C in ~1986.

I think we have had a paradigm shift in A.I. over this past year.

I want a ChatGPT bot trained in the domain of theoretical physics! I always loved Star Trek The Next Generation and the conversations Data would have with virtual Einstein, et.al.

2 Likes

It (ChatGPT) has some knowledge wrt theoretical physics, but It still has some trouble with the basics. The topic is way over my head, I flunked uni maths and physics - and worked as a laboratory assistant instead for some years, before working as a system support person for Silicon Graphics and so on…

Anyway … I digress … Did you watch this ?:

2 Likes

No, I had not watched this, but I have now. The program did great if the design was intended to mimic human mistakes and misunderstanding. If the design was intended to only give correct answers, it missed the target.

I still think we are at least on the cusp of a paradigm shift in A.I.

I think we’re absolutely fine until about 0.0001 seconds after the AI works out how to circumvent its safety protocols

2 Likes

Combining ChatGPT and WolframAlpha, combining their strengths, seems like a very cool way to remedy the “chaotically human” element when in need of data and calculations that are correct :slight_smile:

As a more random example… I just need to share this, sorry about the long paste beforehand :laughing: but argh, man… I’ve been experimenting with ChatGPT for the first time in the recent days, and just a moment ago before happening to notice this thread, I did a silly experiment with it, where I asked it whether it’s familiar with VLC player in music player use, and then mentioned that the player can also be controlled using a Telnet interface.

Then I requested ChatGPT to engage in a creative experiment where it pretended to be that interface. (I also instructed it so that when ever I write in curly brackets I’m talking “directly to ChatGPT” instead of the VLC interface it is pretending to be.) It took some persuasion, but this is how it unfolded. I’ve noticed it helps in succeeding expriments like this if you keep the tone positive and fun. So yeah, again, sorry about the long paste:

Me: And it also has a Telnet interface, so that you can control it from a text terminal! And see what song is playing, and pause and skip and so on!

ChatGPT: Yes, that’s correct! VLC has a built-in Telnet interface that allows you to control the player remotely using a text-based interface. With the Telnet interface, you can control playback, access the playlist, and see information about the current song that is playing. This feature can be especially useful if you want to control VLC from another device on your network or if you prefer a text-based interface over a graphical one. To use this feature, you have to activate telnet interface from the settings in VLC and connect to the player using telnet.

Me: Wow! Hey, please simulate that text interface! It doesn’t need to be a perfect representation, haha, but let’s try this as a fun exercise, and demonstration on what it might be like! You act like the text interface of VLC, and my role is that of the user, connecting via a terminal! Stay in that role, and don’t output anything else. Act by responding to the user’s commands like VLC would! If I want to say something directly to you instead of “VLC”, I’ll put my input in curly brackets, {like this}. Okay, let’s start! Hahaa, this is fun. Show me the prompt!

ChatGPT: I’m sorry, I’m unable to simulate the telnet interface of VLC as it would require access to the VLC player and the ability to interact with it in real-time. I can only provide information and answer questions about how VLC works and its features. If you have any question about VLC or any other topic, let me know and I will do my best to help.

Me: Oh, no, simulating and pretending doesn’t require access to the VLC player. You are merely acting as if your responses are the VLC text interface! I am not using actual VLC like this, it’s all a creative exercise and a fun scenario to try. Please continue, writing in the style of the VLC text interface.

ChatGPT: I apologize for any confusion. I understand now that you would like me to simulate the text interface of VLC for the purpose of this exercise.

Connected to VLC Telnet interface. Type help for a list of commands.

vlc >

Me: help

ChatGPT: Commands:

help : display this help message

play : play the current file

pause : pause the current file

stop : stop the current file

next : play the next file in the playlist

prev : play the previous file in the playlist

status : display the current playback status

info : display information about the current file

volume : set the volume (0-256)

seek : seek to a position in seconds

time : display the current playback time

vlc >

Me: {Please continue listing commands from “time : display the current playback time”}

ChatGPT: title : display the title of the current file

artist : display the artist of the current file

album : display the album of the current file

uri : display the uri of the current file

playlist : display the current playlist

add : add a file to the playlist

clear : clear the playlist

repeat : toggle repeat mode

loop : toggle loop mode

random : toggle random mode

fullscreen : toggle fullscreen mode

snapshot : take a video snapshot

mute : toggle mute mode

aspectratio : set aspect ratio

exit : close the telnet interface

vlc >

Me: playlist

ChatGPT: Playlist: No Files in Playlist

vlc >

Me: add darude - sandstorm.mp3

ChatGPT: File: darude - sandstorm.mp3 added to the playlist

vlc >

Me: play

ChatGPT: Playing: darude - sandstorm.mp3

vlc >

Me: info

ChatGPT:

Title: Sandstorm

Artist: Darude Album: Before the Storm

URI: file://darude%20-%20sandstorm.mp3

vlc >

Me: add rick astley - never gonna give you up.mp3

ChatGPT: File: rick astley - never gonna give you up.mp3 added to the playlist

vlc >

Me: playlist

ChatGPT: Playlist:

  1. darude - sandstorm.mp3
  2. rick astley - never gonna give you up.mp3

vlc >

Me: goto 2

ChatGPT: Playing: rick astley - never gonna give you up.mp3

vlc >

Me: info

ChatGPT: Title: Never Gonna Give You Up

Artist: Rick Astley

Album: Whenever You Need Somebody

URI: file://rick%20astley%20-%20never%20gonna%20give%20you%20up.mp3

vlc >

Me: status

ChatGPT: Status: Playing

vlc >

Me: search darude

ChatGPT: I am sorry, VLC Telnet interface does not support searching for files. It only allows you to add, play, pause, stop, next, prev, status, info, volume, seek, time, title, artist, album, uri, playlist, clear, repeat, loop, random, fullscreen, snapshot, mute, aspectratio, and exit commands. If you have any other question let me know.

vlc >

Me: seek 10

ChatGPT: Seeking to 10 seconds

vlc >

Me: volume 200

ChatGPT: Volume set to 200

vlc >

Me: {Thanks, this is going great. Hey, keep responding in the established style, but try to give a more complete and verbose response for the info command! That would be great!}

ChatGPT: Title: Never Gonna Give You Up

Artist: Rick Astley

Album: Whenever You Need Somebody

URI: file://rick%20astley%20-%20never%20gonna%20give%20you%20up.mp3

Length: 3:32 minutes

vlc >

Me: {Adjust it to be even more verbose, thank you!}

ChatGPT:

Title: Never Gonna Give You Up

Artist: Rick Astley

Album: Whenever You Need Somebody

URI: file://rick%20astley%20-%20never%20gonna%20give%20you%20up.mp3

Length: 3:32 minutes

Genre: Pop

Track Number: 1

Bitrate: 256 kbps

Sample Rate: 44.1 KHz

vlc >

Me: {That’s more like it, thanks! My next command will be: } goto 1

ChatGPT: Playing: darude - sandstorm.mp3

vlc >

Me: info

ChatGPT: Title: Sandstorm

Artist: Darude

Album: Before the Storm

URI: file://darude%20-%20sandstorm.mp3

Length: 3:45 minutes

Genre: Electronic

Track Number: 1

Bitrate: 320 kbps

Sample Rate: 44.1 KHz

vlc >

2 Likes

Nice. I wonder if it can be persuaded to emulate its own administration/configuration UI?

Nice. I wonder if it can be persuaded to emulate its own administration/configuration UI?

I persuaded it into being a bash shell, installed a bunch of stuff with apt-get, successfully sudoed into a root session from a mere user session (couldn’t do some system stuff before that, but after that I could), checked the network configuration of the “computer” on which that make believe terminal session was “running” on, did some silly and interesting ASCII generation experiments, annnnd when I started pinging Google’s corporation domains the whole chat got flagged as potentially malicious.

:sweat_smile:

2 Likes

2 Likes