James L. Weaver
Developer / Evangelist
 
Twitter: @JavaFXpert
Email: jweaver@pivotal.io
http://JavaFXpert.com
http://CulturedEar.com
@JavaFXpert
Composing music algorithmically
Composing music via machine learning
Live demo of CounterpointComposer chord analysis microservice while playing
@JavaFXpert
@JavaFXpert
Note: These Technical Presentation slides and Getting Started slides are available on the CounterpointComposer.com Help menu:
@JavaFXpert
@JavaFXpert
@JavaFXpert
Pivotal Cloud Foundry now runs on Google Cloud Platform
@JavaFXpert
"Machine learning is the science of getting computers to learn, without being explicitly programmed"
- Andrew Ng (co-founder of Coursera, Chief Scientist of Baidu)
@JavaFXpert
Text
@JavaFXpert
@JavaFXpert
@JavaFXpert
@JavaFXpert
What is happening? What is most likely to happen next?
@JavaFXpert
What is happening? What is most likely to happen next?
@JavaFXpert
@JavaFXpert
@JavaFXpert
@JavaFXpert
@JavaFXpert
@JavaFXpert
@JavaFXpert
http://example/analyze?notes=G3 D4 B4
Note: Because Jackson 2 is on the classpath, Spring’s MappingJackson2HttpMessageConverter is automatically chosen to convert the MusicChord instance to JSON
@RestController
public class ChordAnalyzerController {
  private MusicChord musicChord;
  @RequestMapping("/analyze")  // endpoints s/b nouns, so analysis is a better name
  public MusicChord identifyChordByNotes(@RequestParam(value = "notes") String notes) {
    ...
    return musicChord;
  }
}To learn more, see Building a RESTful Web Service Spring Guide
@JavaFXpert
public class MusicChord {
  private final String root;
  private final String chordType;
  private final String bassNote;
  public MusicChord(String root, String chordType, String bassNote) {
    this.root = root;
    this.chordType = chordType;
    this.bassNote = bassNote;
  }
  public String getRoot() {
    return root;
  }
  public String getChordType() {
    return chordType;
  }
  public String getBassNote() {
    return bassNote;
  }
}
@JavaFXpert
package com.culturedear.chord;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class ChordAnalyzerServiceApplication {
  public static void main(String[] args) {
    SpringApplication.run(ChordAnalyzerServiceApplication.class, args);
  }
}To learn more, see Building a RESTful Web Service Spring Guide
@JavaFXpert
$ mvn clean install
$ cf push
Note: One method of deployment for Spring Boot apps is a JAR file, which contains an embedded Tomcat servlet container.
@JavaFXpert
@JavaFXpert
@JavaFXpert
@JavaFXpert
James L. Weaver
Developer / Evangelist
 
Twitter: @JavaFXpert
Email: jweaver@pivotal.io
http://JavaFXpert.com
http://CulturedEar.com
http://CounterpointComposer.com
Hope you enjoyed
@JavaFXpert