Inspiration
I'm very involved with music and find it very fun to create music and especially to freestyle, so it made me wonder if I could make a robot do the same thing that I love doing!
What it does
The robot will take in a random string with the only restriction of it including a space-themed word which is from a sample set of words given to the user. After this, it will create an entire rap based on that singular verse, mimicking the number of syllables, the ending syllable, and also the number of syllables in the last word, which are all included as to help keep the flow in the rap. It will also allow you to go again if you wish to try again with a different theme or if you want to see what you may get with the same theme, which is still fun because it generate randomly each time.
How we built it
I used a text file of the english dictionary to build this code, and then basically had it count the number of syllables in each phrase as to make sure that the final result had the same number of syllables in each line. I also made sure to implement code that would find the last syllable in each bar (verse of the rap) and make sure it was the same in each one. I did this efficiently by creating a class called "Word" which allowed me to make a method for each individual word in a bar to find it's number of syllables and it's final syllable, which only really mattered for the last word of the bar. After this, I used a while loop to allow the user to run the code multiple times if they wished to.
Challenges we ran into
I ran into multiple challenges throughout the code, involving restrictions of how syllables work in the english language, and it is also very possible that I may have forgotten some cases that make syllables sound weird. I also ran into some compiling problems and there may still be some issues since I ran out of time.
Accomplishments that I'm proud of
I'm proud of many of the things I made in here, especially the system that allows each bar to have the exact same # of syllables and end with the same syllable as well.
What I learned
I learned that there is a lot you can do in coding without using external resources, if you just spend enough time and think hard enough. Of course though, you will run out of ways to do it in just Java eventually.
What's next for Spacestylin' Simulator
I really like this idea, so perhaps, given more time, I could develop it into something more formal looking and add some text-to-speech audio so that it is more accessible to all people. Overall, I think I will expand upon Spacestylin' Simulator.
Built With
- https://www.mit.edu/~ecprice/wordlist.10000
- java
Log in or sign up for Devpost to join the conversation.