Git Product home page Git Product logo

psst's Introduction

website-test

psst's People

Contributors

dependabot[bot] avatar jamesadevine avatar noramorsi avatar pelikhan avatar semantic-release-bot avatar venkateshpotluri avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

georgewang0608

psst's Issues

error parsing CSV files

Does a CSV file have to be of a specific format? I tried uploading data from an accelerometer that I generated from a Micro:Bit a while ago (data0 (1).csv) and I get the below runtime error.

Unhandled Rejection (Error): Invalid column reference: "d.Value"
Array.Demo._handleDataChange
C:/Users/vpotluri/code/jacdac/sonification/tempSonification/sonification/src/Demo.tsx:101
   98 |    private _handleDataChange = (data: any) => {
   99 |        // setDataTable(data);
  100 | 
> 101 |        let dataSummary = data.rollup({
      | ^  102 |            mean: d => op.mean(d.Value),
  103 |            min: d => op.min(d.Value),
  104 |            max: d => op.max(d.Value),

DataManager.handleDataChange
C:/Users/vpotluri/code/jacdac/sonification/tempSonification/sonification/src/DataManager.ts:66
  63 | 
  64 |    public handleDataChange() {
  65 |        for (let i = 0; i < this._listeners.length; i++) {
> 66 |            this._listeners[i](this.table);
     | ^  67 |        }
  68 |    }
  69 | 

DataManager.loadDataFromText
C:/Users/vpotluri/code/jacdac/sonification/tempSonification/sonification/src/DataManager.ts:57
  54 |        this.table = aq.fromCSV(text, { delimiter, header });
  55 |        console.log(this.table.columns());
  56 |        console.log(this.table);
> 57 |        this.handleDataChange();
     | ^  58 |    }
  59 | 
  60 |    public loadDataFromFile(file: File) {

(anonymous function)
C:/Users/vpotluri/code/jacdac/sonification/tempSonification/sonification/src/DataManager.ts:61
  58 |    }
  59 | 
  60 |    public loadDataFromFile(file: File) {
> 61 |        file.text().then(text => DataManager.instance.loadDataFromText(text));
     | ^  62 |    }
  

63 | 
  64 |    public handleDataChange() {

Originally posted by @venkateshpotluri in #70 (comment)

need to componentize the UI in the demo.

Currently, I am using booleans to display specific parts of the UI as different radio buttons are selected. This will soon make the demo.tsx file very large and unmanageable. We may want to componentize the UI. mentioning #24 as it is related.

introduce functionality to manipulate other audio parameters than frequency in sonifier

The following features need to be implemented to resolve this issue:

  • introduce enum SonificationProperty that indicates which property to sonify. Possible values: Volume, Pitch, SterioPanning, Spatial.
  • implement functionality to accept multiple enums and vary audio. Implementing support for Spatial can be delayed for later.
  • implement controls in the UI to select these parameters. A simple group of checkboxes should do for a preliminary implementation.

cut off SonifyFixedDuration nodes on update

Currently, outputs that extend SonifyFixedDuration do not end once the node is updated. We need to implement a fix where we can keep track of whether a node is currently playing, and if so, cut it off before playing the following node.

decide, and implement APIs to expose sonified output into other consumers

Based on the discussion on September 15, 2021, here are a tentative list of APIs that need to be exposed.

  • play() /Plays the audio/
  • pause() /pauses the audio/
  • volume(level:Number) /number between 0 and 100 to adjust volume/
  • seekTo(durationInMS:Number) /seek to a particular duration of the audio/

This will be picked up once I am done with #5. in the mean time, please review and feel free to comment if you think i've missed something important here @pelikhan

Data Grid accessibility issues

There are two lingering accessibility issues with the Data Grid:

  • Each data point is announced as a clickable element. Is there any eventual functionality we would implement when we click a point? else this may appear confusing to a screen reader user.
  • there is an empty clickable element next to each column header.

Both require customizing the rendering of the Data Grid

Project structure

I think we should rethink the project structure.

I was trying to contribute to the library today and I thought I'd add a few simple stream sonifications. It was harder than I thought to add a page for my code.

Would it be possible to brain storm how we can better support the demo-page model we spoke about last meeting?

Contributing instructions

The project is missing instruction for developer to build and test locally. This can be added in the README.md or in a CONTRIBUTING.md file.

  • setup: how to install the dependencies
  • development cycle: how to build and debug the code
  • release: how to trigger a release

schedule sounds in frequent intervals

We may have to implement sonification scheduling similar to the approach mentioned here to support #51. For this to work, I would like to brainstorm on who (component) should be responsible for pulling data and other parameter changes from the UI in frequent intervals and how this should happen.

read transformed data from Vega view object after running the data through the data flow

This is with reference to my update from the meeting this morning about using Vega as a data processor. I had thought that reading the data after applying vega transforms would be a straight-forward call, but the vega.view.data function returns the original dataset, and there seems to be no way to retrieve the modified dataset using this method as the modified dataset does not have a name. this issue on Vega-lite informs that this is not a straight-forward process, and This PR on the Vega editor seems to access the transformed data. I am currently in the process of understanding this PR and the related editor source code, and I will update this issue once I have a solution.

Improve screen-reader experience for selecting/importing and presenting data

@venkateshpotluri has mentioned the following usability issues with the interface:

  • Different steps on the UI are exposed to the screen reader without having to press the continue button.

  • the menu button to select the example seems slightly tricky to navigate with a screen reader. I will check if there are better examples of menu buttons similar to this one so that we can evaluate if we can dchange anything about these buttons or use a combo box instead.

  • The table that displays the data is confusing to parse with a screen reader.

    • NVDA announces that the table is of 0 rows and 0 columns both before and after data is loaded. These announcements are automatically generated by NVDA from the semantics of the table.
    • Only the first 2 columns of the CSV seem to be annotated as headers. The file contains a total of 6 columns. I am able to browse the data for the remaining 4 columns but I do not hear the name of the corresponding header.
    • #80
    • #81
  • Data seems to be loaded even before the continue button is clicked. Not sure if this is expected behavior.

  • Aria-label for the file upload button contains that it is a button. This causes duplicate announcements that the file upload is a button. the label "Button for file upload" can be replaced with "choose file" or equivalent.

Installation instructions

The readme should start with instructions on how to add sonification to a project. Typically, npm install .... Currently it dives directly in the architecture of the library.

Implement Authoring UI

Implement a User Interface (UI) for authoring data streaming sonification. The new UI should allow users to add data handlers to incoming JacDac streams. The UI should also support the customization of parameters and data outputs for each data handler.

ideate on interfaces to link JacDac data to a Vega payload

our ultimate goal with the sonification library is to send it Vega-lite payloads and consume sound player functionality. #6 examines the sonification APIs, but to my understanding, this investigation should be about how to create the vega payload to sonify, and how to integrate the sound player functionality into the interface that displays the data. @jmankoff, @pelikhan and @jamesadevine please add comments if you believe there are missing details of this to-do from the meeting.

add gain nodes to oscillators to remove click noise when they are stopped

We hear a clicking noise when we stop oscillator nodes corresponding to each point once they are done being played. Adding gain nodes and reducing the volume of each oscillator to 0 in the last 0.015 seconds of playback might remove this click noise. source: Web Audio: the ugly click and the human ear. Though this article does not mention this, we may also have to increase the volume of each oscillator for 0.015 seconds at the beginning of playback to make the transition smooth.

unable to use sonification.js in HTML files

This is in follow up with the issue I am facing, discussed in our sync up meeting on Oct 27. I am trying to use the transpiled sonification.ts in an index.html to be able to test and debug the sonification code. I have raised a pull request in which we attempt to play some sound in the sonification.ts file. there seems to be issues with resolution of imports when the sonification.ts is transpiled to sonification.js and is called in the index.html. Here is a list of things I tried based on various sources:

  • switched the target, module and lib to es2015/2019.
  • Set the moduleResolution to node.
  • used the type="module" parameter in the script tag in index.html.
  • Used standardized-audio-context for WebAudio (thank you @jmankoff for helping me find this!).

Things we may need

  • to be able to use the ts file in an index.html
  • some kind of activation mechanism like a button to invoke WebAudio.
    Thank you @pelikhan for offering to help with this!

use sonification library in a react-vega scenario

The goal is to test the sonification library in a react-vega scenario to understand if the library provides all the necessary endpoints. Perhaps this is best to test after @jrthompson33 fixes #50 in case code changes are necessary to the sonification library. We should iteratively do this with the next attempt after I fix #45.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.